diff rhodecode/__init__.py @ 852:b76da6f22e0f beta

fixed some problems with python setup.py operations due to import problems
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 16 Dec 2010 01:25:43 +0100
parents 28a4bb11bb6f
children 3d0661b8aaa4 508b3976345e
line wrap: on
line diff
--- a/rhodecode/__init__.py	Thu Dec 16 01:08:46 2010 +0100
+++ b/rhodecode/__init__.py	Thu Dec 16 01:25:43 2010 +0100
@@ -31,8 +31,12 @@
 __version__ = '.'.join((str(each) for each in VERSION[:4]))
 __dbversion__ = 2 #defines current db version for migrations
 
-from rhodecode.lib.utils import get_current_revision
-_rev = get_current_revision()
+try:
+    from rhodecode.lib.utils import get_current_revision
+    _rev = get_current_revision()
+except ImportError:
+    #this is needed when doing some setup.py operations
+    _rev = False
 
 if len(VERSION) > 3 and _rev:
     __version__ += ' [rev:%s]' % _rev[0]