diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-08-29 12:08:26 +0100 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-08-30 11:31:26 +0000 |
commit | c4facff97b27968f00a75ffb3d49cea2080ad9a4 (patch) | |
tree | 49cebc6256034d1fea831d5243fac7712e93c42b /morphlib/builder2.py | |
parent | 2a071ef057c953e81e1b8bd9b714373b4dbb26c2 (diff) | |
download | morph-c4facff97b27968f00a75ffb3d49cea2080ad9a4.tar.gz |
Log a clear error if creating an empty stratum
This is mostly useful for diagnosing Morph bugs. Currently empty strata
just cause confusing errors when building systems.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r-- | morphlib/builder2.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py index 672a08a1..537a56d0 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -441,6 +441,8 @@ class StratumBuilder(BuilderBase): constituents = [dependency for dependency in self.artifact.dependencies if dependency.source.morphology['kind'] == 'chunk'] + if len(constituents) == 0: + logging.error('Stratum %s is empty' % self.artifact.name) # the only reason the StratumBuilder has to download chunks is to # check for overlap now that strata are lists of chunks with self.build_watch('check-chunks'): |