summaryrefslogtreecommitdiff
path: root/morphlib/buildcommand.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-13 11:59:17 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-13 15:20:03 +0000
commitd2eb452ee48253d6e90f7aa4f6c41b6fd8cdf009 (patch)
tree6ffdc15171cc282d5ddbe4c7814b0a356aaf63b6 /morphlib/buildcommand.py
parentbd3e607439a0d3fe03bfac0eeea4701ff606b1e1 (diff)
downloadmorph-d2eb452ee48253d6e90f7aa4f6c41b6fd8cdf009.tar.gz
Allow unknown values of build-mode through with just a warning
This gives us some forward compatibility leeway to introduce new build modes, as long as they are compatible with staging. As suggested by Richard Maw.
Diffstat (limited to 'morphlib/buildcommand.py')
-rw-r--r--morphlib/buildcommand.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py
index 9f6a0470..6fe46e0b 100644
--- a/morphlib/buildcommand.py
+++ b/morphlib/buildcommand.py
@@ -236,9 +236,10 @@ class BuildCommand(object):
extra_path = [os.path.join(d, 'bin') for d in dep_prefix_set]
if build_mode not in ['bootstrap', 'staging', 'test']:
- raise morphlib.Error(
- 'Unknown build mode for chunk %s: %s' %
- (artifact.name, build_mode))
+ logging.warning('Unknown build mode %s for chunk %s. '
+ 'Defaulting to staging mode.' %
+ (build_mode, artifact.name))
+ build_mode = 'staging'
use_chroot = build_mode=='staging'
staging_area = self.create_staging_area(