diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-10-06 13:22:40 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-10-07 11:29:40 +0100 |
commit | d9fa855e5b5a6fca890ec8426daefbf49c2352d6 (patch) | |
tree | 301c65c18cf67629498605cd38e3e2c1ce19a6e3 | |
parent | fba7620021d32afb03cb10aa9d1ebb194721bb67 (diff) | |
download | morph-d9fa855e5b5a6fca890ec8426daefbf49c2352d6.tar.gz |
import: Raise error on invalid .lorry file
-rw-r--r-- | import/main.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/import/main.py b/import/main.py index 7c924091..767deef1 100644 --- a/import/main.py +++ b/import/main.py @@ -153,6 +153,10 @@ class LorrySet(object): raise cliapp.AppException( 'Invalid lorry %s: %s' % (filename, lorry_entry)) + if not isinstance(info['url'], str): + raise cliapp.AppException( + 'Invalid URL in lorry %s: %s' % (filename, info['url'])) + if project_name in self.data: stored_lorry = self.get_lorry(project_name) |