← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/improve-ptuj-oops into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/improve-ptuj-oops into lp:launchpad.

Commit message:
Make PackageTranslationsUploadJob OOPS emails slightly more informative.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/improve-ptuj-oops/+merge/368186
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/improve-ptuj-oops into lp:launchpad.
=== modified file 'lib/lp/soyuz/model/packagetranslationsuploadjob.py'
--- lib/lp/soyuz/model/packagetranslationsuploadjob.py	2018-03-26 09:22:36 +0000
+++ lib/lp/soyuz/model/packagetranslationsuploadjob.py	2019-05-31 11:27:08 +0000
@@ -115,6 +115,10 @@
             Job.base_job_type == JobType.UPLOAD_PACKAGE_TRANSLATIONS)
         return (cls(job) for job in jobs)
 
+    def getOperationDescription(self):
+        return "uploading translations of %s in %s" % (
+            self.sourcepackagename.name, self.distroseries)
+
     def getErrorRecipients(self):
         if self.requester is not None:
             return [format_address_for_person(self.requester)]

=== modified file 'lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py'
--- lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py	2018-02-22 14:06:35 +0000
+++ lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py	2019-05-31 11:27:08 +0000
@@ -104,6 +104,13 @@
         jobs = list(PackageTranslationsUploadJob.iterReady())
         self.assertEqual(1, len(jobs))
 
+    def test_getOperationDescription(self):
+        _, sp, job = self.makeJob()
+        self.assertEqual(
+            "uploading translations of %s in %s" % (
+                sp.sourcepackagename.name, sp.distroseries),
+            job.getOperationDescription())
+
     def test_getErrorRecipients_requester(self):
         _, _, job = self.makeJob()
         email = format_address_for_person(job.requester)


Follow ups