aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.py25
1 files changed, 16 insertions, 9 deletions
diff --git a/configure.py b/configure.py
index d6c632a1a..8ac230fe0 100755
--- a/configure.py
+++ b/configure.py
@@ -41,17 +41,21 @@ def flatten(l):
return sum(l, [])
def get_vc_revision():
- mtn = subprocess.Popen(['mtn', 'automate', 'heads'],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ try:
+ mtn = subprocess.Popen(['mtn', 'automate', 'heads'],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
- (stdout, stderr) = mtn.communicate()
+ (stdout, stderr) = mtn.communicate()
- if(stderr != ''):
- #logging.debug('Error getting rev from monotone - %s' % (stderr))
- return 'unknown'
+ if(stderr != ''):
+ logging.debug('Error getting rev from monotone - %s' % (stderr))
+ return 'unknown'
- return 'mtn:' + stdout.strip()
+ return 'mtn:' + stdout.strip()
+ except OSError, e:
+ logging.debug('Error getting rev from monotone - %s' % (e[1]))
+ return 'unknown'
class BuildConfigurationInformation(object):
@@ -65,7 +69,7 @@ class BuildConfigurationInformation(object):
version_datestamp = botan_version.release_datestamp
- version_vc_rev = botan_version.release_vc_rev or get_vc_revision()
+ version_vc_rev = botan_version.release_vc_rev
version_string = '%d.%d.%d' % (version_major, version_minor, version_patch)
"""
@@ -73,6 +77,9 @@ class BuildConfigurationInformation(object):
"""
def __init__(self, options, modules):
+ if self.version_vc_rev is None:
+ self.version_vc_rev = get_vc_revision()
+
self.build_dir = os.path.join(options.with_build_dir, 'build')
self.checkobj_dir = os.path.join(self.build_dir, 'checks')