← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-packageuploadnotificationjob-bytesio into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-packageuploadnotificationjob-bytesio into launchpad:master.

Commit message:
Port PackageUploadNotificationJob to BytesIO

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/391160
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-packageuploadnotificationjob-bytesio into launchpad:master.
diff --git a/lib/lp/soyuz/model/archivejob.py b/lib/lp/soyuz/model/archivejob.py
index b691683..d0ed964 100644
--- a/lib/lp/soyuz/model/archivejob.py
+++ b/lib/lp/soyuz/model/archivejob.py
@@ -3,8 +3,8 @@
 
 __metaclass__ = type
 
+import io
 import logging
-import StringIO
 
 from lazr.delegates import delegate_to
 import six
@@ -165,8 +165,7 @@ class PackageUploadNotificationJob(ArchiveJobDerived):
         if packageupload.changesfile is None:
             changes_file_object = None
         else:
-            changes_file_object = StringIO.StringIO(
-                packageupload.changesfile.read())
+            changes_file_object = io.BytesIO(packageupload.changesfile.read())
         logger = logging.getLogger()
         packageupload.notify(
             status=self.packageupload_status, summary_text=self.summary_text,