[asterisk-commits] qwell: testsuite/asterisk/trunk r1774 - /asterisk/trunk/lib/python/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 21 13:05:42 CDT 2011
Author: qwell
Date: Thu Jul 21 13:05:39 2011
New Revision: 1774
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1774
Log:
Support single-...thingie, thingies. Read: Support Asterisk 10.
Modified:
asterisk/trunk/lib/python/asterisk/version.py
Modified: asterisk/trunk/lib/python/asterisk/version.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/version.py?view=diff&rev=1774&r1=1773&r2=1774
==============================================================================
--- asterisk/trunk/lib/python/asterisk/version.py (original)
+++ asterisk/trunk/lib/python/asterisk/version.py Thu Jul 21 13:05:39 2011
@@ -67,11 +67,13 @@
# team branch XXX (may not be off of trunk)
return 99999999
else:
- res = int(self.concept) * 10000000 + int(self.major) * 100000
- if self.minor is not None:
- res += int(self.minor) * 1000
- if self.patch is not None:
- res += int(self.patch) * 10
+ res = int(self.concept) * 10000000
+ if self.major is not None:
+ res + int(self.major) * 100000
+ if self.minor is not None:
+ res += int(self.minor) * 1000
+ if self.patch is not None:
+ res += int(self.patch) * 10
return res
def __cmp__(self, other):
@@ -85,9 +87,11 @@
self.svn = False
parts = self.version_str.split(".")
self.concept = parts[0]
- self.major = parts[1]
+ self.major = None
self.minor = None
self.patch = None
+ if len(parts) >= 2:
+ self.major = parts[1]
if len(parts) >= 3:
self.minor = parts[2]
if len(parts) >= 4:
More information about the asterisk-commits
mailing list