Skip to content

Commit

Permalink
Merge pull request #78 from RandomGamingDev/main
Browse files Browse the repository at this point in the history
Fixed Python3.3 support breakage with `sys.platform` being 'linux2' prior to Python3.3
  • Loading branch information
NicSavichev authored Sep 5, 2024
2 parents 71a2658 + 03292b4 commit 56ed5c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions make_devtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
print('\nUsage: make_devtools.py DEVTOOLS_DEST_DIR\nexample: python3 make_devtools.py d:\\devtools\n')
exit(1)

if sys.platform == 'darwin':
if sys.platform.startswith('darwin'):
exit(exec(open(os.path.join(os.path.dirname(__file__), "make_devtools_macOS.py")).read()))
elif sys.platform == 'linux':
elif sys.platform.startswith('linux'):
exit(exec(open(os.path.join(os.path.dirname(__file__), "make_devtools_linux.py")).read()))

def error(s):
Expand Down
2 changes: 1 addition & 1 deletion make_devtools_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
if sys.version_info.major < 3:
print("\nERROR: Python 3 or a higher version is required to run this script.")
exit(1)
if sys.platform != 'linux':
if not sys.platform.startswith('linux'):
print("\nERROR: script is expected to be run on linux.")
exit(1)

Expand Down
2 changes: 1 addition & 1 deletion make_devtools_macOS.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
if sys.version_info.major < 3:
print("\nERROR: Python 3 or a higher version is required to run this script.")
exit(1)
if sys.platform != 'darwin':
if not sys.platform.startswith('darwin'):
print("\nERROR: script is expected to be run on macOS.")
exit(1)

Expand Down

0 comments on commit 56ed5c3

Please sign in to comment.