Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIGTOP-4034: Add python3 support in bigtop-select #1203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bigtop-packages/src/common/bigtop-select/conf-select
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down
17 changes: 7 additions & 10 deletions bigtop-packages/src/common/bigtop-select/distro-select
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down Expand Up @@ -157,7 +157,7 @@ def listPackages( packages ):
if packages == None:
packages = leaves

packages.sort()
packages = sorted(packages)
for pkg in packages:
linkname = current + "/" + pkg
if os.path.isdir(linkname):
Expand All @@ -168,13 +168,11 @@ def listPackages( packages ):

# Print the avaialable package names
def printPackages():
packages = leaves.keys()
packages.sort()
packages = sorted(leaves.keys())
print("Packages:")
for pkg in packages:
print(" " + pkg)
groups = aliases.keys()
groups.sort()
groups = sorted(aliases.keys())
print("Aliases:")
for pkg in groups:
print(" " + pkg)
Expand All @@ -199,8 +197,7 @@ def printVersions():
print("ERROR: Unexpected file/directory found in %s: %s" % (root, f))
sys.exit(1)

keys = result.keys()
keys.sort()
keys = sorted(result.keys())
for k in keys:
print(result[k])

Expand All @@ -221,9 +218,9 @@ def setPackages(packages, version, rpm_mode):
sys.exit(1)

if not os.path.isdir(current):
os.mkdir(current, 0755)
os.mkdir(current, 0o755)

packages.sort()
packages = sorted(packages)
for pkg in packages:
linkname = current + "/" + pkg
if os.path.islink(linkname) and rpm_mode:
Expand Down