=== modified file 'lib/lp/bugs/model/apportjob.py'
--- lib/lp/bugs/model/apportjob.py 2010-02-11 11:01:12 +0000
+++ lib/lp/bugs/model/apportjob.py 2010-02-11 12:08:02 +0000
@@ -83,7 +83,7 @@
self.job = Job()
self.blob = blob self.job_type = job_type
- # XXX AaronBentley 2009-01-29 blob=322819: This should be a
+ # XXX AaronBentley 2009-01-29 bug=322819: This should be a
# bytestring, but the DB representation is unicode. self._json_data = json_data.decode('utf-8')
@@ -196,8 +196,9 @@
raise SQLObjectNotFound( "No ProcessApportBlobJob found for UUID %s" % uuid)
- assert jobs_for_blob.count() < 2, (
- "There can only be one ProcessApportBlobJob for a BLOB.")
+ if jobs_for_blob.count() > 1:
+ raise AssertionError(
+ "There can only be one ProcessApportBlobJob for a BLOB.")
Incremental diff of fixage:
=== modified file 'lib/lp/ bugs/model/ apportjob. py' bugs/model/ apportjob. py 2010-02-11 11:01:12 +0000 bugs/model/ apportjob. py 2010-02-11 12:08:02 +0000
self. job_type = job_type
self. _json_data = json_data. decode( 'utf-8' )
--- lib/lp/
+++ lib/lp/
@@ -83,7 +83,7 @@
self.job = Job()
self.blob = blob
- # XXX AaronBentley 2009-01-29 blob=322819: This should be a
+ # XXX AaronBentley 2009-01-29 bug=322819: This should be a
# bytestring, but the DB representation is unicode.
@@ -196,8 +196,9 @@
"No ProcessApportBl obJob found for UUID %s" % uuid)
raise SQLObjectNotFound(
- assert jobs_for_ blob.count( ) < 2, ( obJob for a BLOB.") blob.count( ) > 1: obJob for a BLOB.")
- "There can only be one ProcessApportBl
+ if jobs_for_
+ raise AssertionError(
+ "There can only be one ProcessApportBl
return cls(jobs_ for_blob. any())