diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2015-03-11 15:38:34 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2015-03-11 15:38:34 +0000 |
commit | 956a0a2e73fc8f06e289788c22ed3f8ed574fb65 (patch) | |
tree | ccbc87d908f1a2513df87dfe4b117cc8960cb3fe | |
parent | 16cad2432acc307bb5a7877ea9862862144ca95f (diff) | |
download | morph-956a0a2e73fc8f06e289788c22ed3f8ed574fb65.tar.gz |
Print warning message for non-sha1 chunk refs.
-rw-r--r-- | morphlib/morphloader.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/morphloader.py b/morphlib/morphloader.py index 7d51dc1e..a29e60bf 100644 --- a/morphlib/morphloader.py +++ b/morphlib/morphloader.py @@ -529,6 +529,9 @@ class MorphologyLoader(object): elif not isinstance(ref, basestring): raise ChunkSpecRefNotStringError( ref, spec.get('alias', spec['name']), morph.filename) + elif not morphlib.git.is_valid_sha1(ref): + warnings.warn('Chunk "{}" has non-sha1 ref: "{}"\n' + .format(spec['name'], ref)) # Require build-dependencies for the stratum itself, unless # it has chunks built in bootstrap mode. |