diff setup.py @ 7647:f7256cd9beff

recover when no version information is available
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 15 Jan 2009 11:41:59 +0100
parents 9626819b2e3d
children 02e358a3a8a7
line wrap: on
line diff
--- a/setup.py	Mon Jan 12 13:51:43 2009 -0600
+++ b/setup.py	Thu Jan 15 11:41:59 2009 +0100
@@ -97,7 +97,7 @@
     l = os.popen('hg id -it').read().split()
     while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags
         l.pop()
-    version = l[-1] or 'unknown' # latest tag or revision number
+    version = l and l[-1] or 'unknown' # latest tag or revision number
     if version.endswith('+'):
         version += time.strftime('%Y%m%d')