Code review comment for lp:~gmb/launchpad/create-blobjobs-bug-519205

Revision history for this message
Graham Binns (gmb) wrote :

Incremental diff of fixage:

=== 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.")

         return cls(jobs_for_blob.any())

« Back to merge proposal