[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.45-35-g3633050
Andreas Beckmann
debian at abeckmann.de
Wed Jun 27 20:03:57 UTC 2012
The following commit has been merged in the develop branch:
commit 552676009ea70f05f988d94c1879cf2f8007122b
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Mon Jun 25 23:19:43 2012 +0200
pkgdb: introduce LogfileExists exception
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index bca29f4..b962e3a 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -224,6 +224,12 @@ class LogDB:
self._evict(full_name)
+class LogfileExists(Exception):
+
+ def __init__(self, path, package, version):
+ self.args = (path, package, version)
+
+
class PackagesDB:
# keep in sync with piuparts-report.py: emphasize_reason()
@@ -595,8 +601,7 @@ class PackagesDB:
self._logdb.remove(self._reserved, package, version)
self._record_submission("pass", package, version)
else:
- raise Exception("Log file exists already: %s (%s)" %
- (package, version))
+ raise LogfileExists(self._ok, package, version)
def fail_package(self, package, version, log):
self._check_for_acceptability_as_filename(package)
@@ -605,8 +610,7 @@ class PackagesDB:
self._logdb.remove(self._reserved, package, version)
self._record_submission("fail", package, version)
else:
- raise Exception("Log file exists already: %s (%s)" %
- (package, version))
+ raise LogfileExists(self._fail, package, version)
def make_package_untestable(self, package, version, log):
self._check_for_acceptability_as_filename(package)
@@ -615,8 +619,7 @@ class PackagesDB:
self._logdb.remove(self._reserved, package, version)
self._record_submission("untestable", package, version)
else:
- raise Exception("Log file exists already: %s (%s)" %
- (package, version))
+ raise LogfileExists(self._evil, package, version)
def calc_rrdep_counts(self):
"""Calculate recursive reverse dependency counts for Packages"""
--
piuparts git repository
More information about the Piuparts-commits
mailing list