[Zope3-checkins] CVS: Zope3/src/zope/app/applicationcontrol - zopeversion.py:1.7

Fred L. Drake, Jr. fred at zope.com
Fri Apr 30 10:30:42 EDT 2004


Update of /cvs-repository/Zope3/src/zope/app/applicationcontrol
In directory cvs.zope.org:/tmp/cvs-serv27834

Modified Files:
	zopeversion.py 
Log Message:
minor cleanup


=== Zope3/src/zope/app/applicationcontrol/zopeversion.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/applicationcontrol/zopeversion.py:1.6	Mon Mar  1 08:43:24 2004
+++ Zope3/src/zope/app/applicationcontrol/zopeversion.py	Fri Apr 30 10:30:42 2004
@@ -43,15 +43,17 @@
             # get the tag information
             if os.path.isfile(tagfile):
                 f = open(tagfile)
-                tag = f.read()
+                tag = f.readline().rstrip()
+                f.close()
                 if tag.startswith("T"):
-                    version_tag = " (%s)" % tag[1:-1]
+                    version_tag = " (%s)" % tag[1]
 
         # try to get official Zope release information
         versionfile = os.path.join(zopedir, "version.txt")
         if os.path.isfile(versionfile) and not is_cvs:
             f = open(versionfile)
-            version_id = f.readlines()[0] or version_id
+            version_id = f.readline().strip() or version_id
+            f.close()
 
         version = "%s%s" % (version_id, version_tag)
         return version




More information about the Zope3-Checkins mailing list