From d9fa855e5b5a6fca890ec8426daefbf49c2352d6 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Mon, 6 Oct 2014 13:22:40 +0100 Subject: import: Raise error on invalid .lorry file --- import/main.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.2.1