recover when no version information is available
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Thu, 15 Jan 2009 11:41:59 +0100
changeset 7647 f7256cd9beff
parent 7646 e62a456b8dc5
child 7648 02e358a3a8a7
recover when no version information is available
setup.py
--- 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')