[Jython-checkins] jython (2.5): Fix for #1971: platform.py - 'NoneType' object has no attribute 'groups'
alan.kennedy
jython-checkins at python.org
Sat Feb 9 16:51:38 CET 2013
http://hg.python.org/jython/rev/56e560cd6209
changeset: 7021:56e560cd6209
branch: 2.5
user: Alan Kennedy <alan at xhaus.com>
date: Sat Feb 09 15:49:21 2013 +0000
summary:
Fix for #1971: platform.py - 'NoneType' object has no attribute 'groups'
files:
Lib/platform.py | 3 ++-
build.xml | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Lib/platform.py b/Lib/platform.py
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -1111,8 +1111,9 @@
### Various APIs for extracting information from sys.version
+# buildno can be an empty string if the jar was compiled without mercurial present
_sys_version_parser = re.compile(r'([\w.+]+)\s*'
- '\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*'
+ '\(#?([^,]+)?,\s*([\w ]+),\s*([\w :]+)\)\s*'
'\[([^\]]+)\]?')
_sys_version_cache = None
diff --git a/build.xml b/build.xml
--- a/build.xml
+++ b/build.xml
@@ -342,8 +342,10 @@
<condition property="hg-run">
<and>
<isset property="hg.present"/>
- <!-- XXX: Might this work on Windows? -->
- <isset property="os.family.unix"/>
+ <or>
+ <isset property="os.family.unix"/>
+ <isset property="os.family.windows"/>
+ </or>
</and>
</condition>
</target>
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list