# HG changeset patch # User Benoit Boissinot # Date 1232016119 -3600 # Node ID f7256cd9beffe9efd85957368781a88171ed9977 # Parent e62a456b8dc578655b53ca4978e22b662193984e recover when no version information is available diff -r e62a456b8dc5 -r f7256cd9beff 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')