[Zope-CVS] SVN: zpkgtools/trunk/zpkgsetup/setup.py Be tolerant when
the version number is None.
Fred L. Drake, Jr.
fred at zope.com
Fri Jun 18 16:56:47 EDT 2004
Log message for revision 25913:
Be tolerant when the version number is None.
-=-
Modified: zpkgtools/trunk/zpkgsetup/setup.py
===================================================================
--- zpkgtools/trunk/zpkgsetup/setup.py 2004-06-18 20:06:56 UTC (rev 25912)
+++ zpkgtools/trunk/zpkgsetup/setup.py 2004-06-18 20:55:28 UTC (rev 25913)
@@ -122,16 +122,17 @@
publication.load(f, metadata=self)
if self.platforms:
self.platforms = ", ".join(self.platforms)
- m = re.match(r"\d+\.\d+(\.\d+)?(?:(?P<status>[ab])\d*)?$",
- self.version)
- if m is not None:
- devstatus = publication.STABLE
- status = m.group("status")
- if status == "a":
- devstatus = publication.ALPHA
- elif status == "b":
- devstatus = publication.BETA
- publication.set_development_status(self, devstatus)
+ if self.version:
+ m = re.match(r"\d+\.\d+(\.\d+)?(?:(?P<status>[ab])\d*)?$",
+ self.version)
+ if m is not None:
+ devstatus = publication.STABLE
+ status = m.group("status")
+ if status == "a":
+ devstatus = publication.ALPHA
+ elif status == "b":
+ devstatus = publication.BETA
+ publication.set_development_status(self, devstatus)
def scan(self, name, directory, reldir):
init_py = os.path.join(directory, "__init__.py")
More information about the Zope-CVS
mailing list