[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] 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.")
 
-- 
2.11.0


Reply to: