diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-12-24 15:19:42 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2016-12-24 15:19:42 (GMT) |
commit | 5c6f0fdf1ebbd4c28f524a0347fe556ff2421504 (patch) | |
tree | 0fe8c763d2db979600892c1a746bec3bcca87ef8 /doc | |
parent | 0615b1b023f7888dfdbeee7673d6d0bcc7b803df (diff) | |
download | Doxygen-5c6f0fdf1ebbd4c28f524a0347fe556ff2421504.zip Doxygen-5c6f0fdf1ebbd4c28f524a0347fe556ff2421504.tar.gz Doxygen-5c6f0fdf1ebbd4c28f524a0347fe556ff2421504.tar.bz2 |
Bug 760678 - fails to build with an unreleased python version
Diffstat (limited to 'doc')
-rw-r--r-- | doc/translator.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/translator.py b/doc/translator.py index 55ad08f..798774b 100644 --- a/doc/translator.py +++ b/doc/translator.py @@ -83,8 +83,7 @@ def xopen(fname, mode='r', encoding='utf-8-sig'): the default 'utf-8-sig' is used (skips the BOM automatically).
'''
- major, minor, patch = (int(e) for e in platform.python_version_tuple())
- if major == 2:
+ if sys.version_info[0] == 2:
return open(fname, mode=mode) # Python 2 without encoding
else:
return open(fname, mode=mode, encoding=encoding) # Python 3 with encoding
@@ -1990,7 +1989,8 @@ class TrManager: if __name__ == '__main__':
# The Python 2.6+ or 3.3+ is required.
- major, minor, patch = (int(e) for e in platform.python_version_tuple())
+ major = sys.version_info[0]
+ minor = sys.version_info[1]
if (major == 2 and minor < 6) or (major == 3 and minor < 0):
print('Python 2.6+ or Python 3.0+ are required for the script')
sys.exit(1)
|