commit | 60bf0e4daa4a498d53c37dba93cf03dd0c1924e8 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Fri Sep 20 21:25:53 2013 +0300 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Fri Sep 20 21:25:53 2013 +0300 |
tree | abad8bb113f031af764e23e4087344fb534a91a7 | |
parent | f1c1cd9b3b457feeab41123da6d0d9a0040727b4 [diff] [blame] |
Issue #18050: Fixed an incompatibility of the re module with Python 2.7.3 and older binaries.
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py index b0175e7..69224e2 100644 --- a/Lib/sre_constants.py +++ b/Lib/sre_constants.py
@@ -15,7 +15,11 @@ MAGIC = 20031017 -from _sre import MAXREPEAT +try: + from _sre import MAXREPEAT +except ImportError: + import _sre + MAXREPEAT = _sre.MAXREPEAT = 65535 # SRE standard exception (access as sre.error) # should this really be here?