]> git.decadent.org.uk Git - dak.git/commitdiff
Rename exception.
authorAnsgar Burchardt <ansgar@debian.org>
Tue, 3 Feb 2015 19:52:41 +0000 (20:52 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Tue, 3 Feb 2015 19:53:14 +0000 (20:53 +0100)
Also inherit from Reject so a proper rejection message is shown
instead of a backtrace.

daklib/checks.py

index 26439aaa798e2726b5ca5cb21d6f5f8a42258c61..70e1f5e398dd3b17e4e5d1f9127f15e4dfb84abb 100644 (file)
@@ -57,7 +57,7 @@ class Reject(Exception):
     """exception raised by failing checks"""
     pass
 
-class RejectStupidMaintainerException(Exception):
+class RejectExternalFilesMismatch(Reject):
     """exception raised by failing the external hashes check"""
 
     def __str__(self):
@@ -256,16 +256,16 @@ class ExternalHashesCheck(Check):
             return
 
         if ext_size != f.size:
-            raise RejectStupidMaintainerException(f.filename, 'size', f.size, ext_size)
+            raise RejectExternalFilesMismatch(f.filename, 'size', f.size, ext_size)
 
         if ext_md5sum != f.md5sum:
-            raise RejectStupidMaintainerException(f.filename, 'md5sum', f.md5sum, ext_md5sum)
+            raise RejectExternalFilesMismatch(f.filename, 'md5sum', f.md5sum, ext_md5sum)
 
         if ext_sha1sum != f.sha1sum:
-            raise RejectStupidMaintainerException(f.filename, 'sha1sum', f.sha1sum, ext_sha1sum)
+            raise RejectExternalFilesMismatch(f.filename, 'sha1sum', f.sha1sum, ext_sha1sum)
 
         if ext_sha256sum != f.sha256sum:
-            raise RejectStupidMaintainerException(f.filename, 'sha256sum', f.sha256sum, ext_sha256sum)
+            raise RejectExternalFilesMismatch(f.filename, 'sha256sum', f.sha256sum, ext_sha256sum)
 
     def check(self, upload):
         cnf = Config()