summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2010-08-15 20:17:43 +0200
committerGuido Günther <agx@sigxcpu.org>2010-08-15 20:19:22 +0200
commitaf3dc21656d7f19297a5115ce478b94a5c19c9cb (patch)
tree7fe372a4ecfc455bf69d69e1226f3e78f4bad114
parentb5cb62e40a01ca34ef2fc921e8d0fda308d11978 (diff)
Don't fail on gbp_version import errors
This makes it easier to test from the source tree without starting a build first.
-rw-r--r--gbp/config.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gbp/config.py b/gbp/config.py
index 530a4ddd..5513614a 100644
--- a/gbp/config.py
+++ b/gbp/config.py
@@ -1,12 +1,15 @@
# vim: set fileencoding=utf-8 :
#
-# (C) 2006,2007 Guido Guenther <agx@sigxcpu.org>
+# (C) 2006,2007,2010 Guido Guenther <agx@sigxcpu.org>
"""handles command line and config file option parsing for the gbp commands"""
from optparse import OptionParser, OptionGroup
from ConfigParser import SafeConfigParser
import os.path
-from gbp.gbp_version import gbp_version
+try:
+ from gbp.gbp_version import gbp_version
+except ImportError:
+ gbp_version = "[Unknown version]"
class GbpOptionParser(OptionParser):
"""