[Zope3-checkins] CVS: Zope3/src/zope/app/translation_files - extract.py:1.18

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


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

Modified Files:
	extract.py 
Log Message:
don't presume to know how to get the Zope version; use the
ZopeVersionUtility to do the work


=== Zope3/src/zope/app/translation_files/extract.py 1.17 => 1.18 ===
--- Zope3/src/zope/app/translation_files/extract.py:1.17	Fri Apr  2 09:03:29 2004
+++ Zope3/src/zope/app/translation_files/extract.py	Fri Apr 30 10:28:51 2004
@@ -117,12 +117,8 @@
         if os.path.exists(fn):
             return open(fn, 'r').read().strip()
         # Second, try to find a Zope version
-        import zope
-        fn = os.path.join(os.path.dirname(zope.__file__), 'version.txt')
-        if os.path.exists(fn):
-            return open(fn, 'r').read().strip()
-        else:
-            return 'Zope 3 (unknown version)'
+        from zope.app.applicationcontrol.zopeversion import ZopeVersionUtility
+        return ZopeVersionUtility.getZopeVersion()
 
     def write(self):
         file = open(self._output_filename, 'w')




More information about the Zope3-Checkins mailing list