From d57b459b933440c2b5099715bb1e4e9a429dd552 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Thu, 8 Mar 2018 10:34:56 +0100 Subject: [PATCH] Add a check that upload.changes.byhand_files is sane This lets us reject an upload up front rather than dying later in process-upload. --- daklib/checks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/daklib/checks.py b/daklib/checks.py index e2379885..1e278fbd 100644 --- a/daklib/checks.py +++ b/daklib/checks.py @@ -251,6 +251,11 @@ class ChangesCheck(Check): except ParseMaintError as e: raise Reject('{0}: Failed to parse Changed-By field: {1}'.format(changes.filename, e)) + try: + changes.byhand_files + except daklib.upload.InvalidChangesException as e: + raise Reject('{0}'.format(e)) + if len(changes.files) == 0: raise Reject("Changes includes no files.") -- GitLab