[Numpy-svn] r3166 - trunk/numpy/distutils

numpy-svn at scipy.org numpy-svn at scipy.org
Fri Sep 15 16:18:53 CDT 2006


Author: oliphant
Date: 2006-09-15 16:18:33 -0500 (Fri, 15 Sep 2006)
New Revision: 3166

Modified:
   trunk/numpy/distutils/misc_util.py
Log:
Small code re-org in _get_svn_revision

Modified: trunk/numpy/distutils/misc_util.py
===================================================================
--- trunk/numpy/distutils/misc_util.py	2006-09-15 21:13:09 UTC (rev 3165)
+++ trunk/numpy/distutils/misc_util.py	2006-09-15 21:18:33 UTC (rev 3166)
@@ -1202,14 +1202,15 @@
         """ Return path's SVN revision number.
         """
         revision = None
+        m = None
         try:
             sin, sout = os.popen4('svnversion')
             m = re.match(r'(?P<revision>\d+)', sout.read())
-            if m:
-                revision = int(m.group('revision'))
-                return revision
         except:
             pass
+        if m:
+            revision = int(m.group('revision'))
+            return revision
         if sys.platform=='win32' and os.environ.get('SVN_ASP_DOT_NET_HACK',None):
             entries = njoin(path,'_svn','entries')
         else:



More information about the Numpy-svn mailing list