diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-02-11 12:35:31 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-02-11 12:35:31 +0100 |
commit | de7393dcb9d784f2219b97c418b27f8cf32cd622 (patch) | |
tree | dcdf05a1de635587b0277521f9c7d73ac2c23ca0 | |
parent | 215a4c7a1a1782066d362ae5fa1f37ee76c77573 (diff) | |
download | gemato-de7393dcb9d784f2219b97c418b27f8cf32cd622.tar.gz |
cli: Attempt to fix Python 2 compatibility
-rw-r--r-- | gemato/cli.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gemato/cli.py b/gemato/cli.py index e602018..a88bd5f 100644 --- a/gemato/cli.py +++ b/gemato/cli.py @@ -523,4 +523,8 @@ def main(argv): def setuptools_main(): logging.getLogger().setLevel(logging.INFO) - sys.exit(main(sys.argv)) + if sys.hexversion < 0x03000000: + argv = [x.decode(sys.getfilesystemencoding()) for x in sys.argv] + else: + argv = sys.argv + sys.exit(main(argv)) |