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

Commit message:
Port lp.bugs.model.apportjob to BytesIO

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/391083
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad:py3-apportjob-bytesio into launchpad:master.
diff --git a/lib/lp/bugs/model/apportjob.py b/lib/lp/bugs/model/apportjob.py
index fdbc847..4bef028 100644
--- a/lib/lp/bugs/model/apportjob.py
+++ b/lib/lp/bugs/model/apportjob.py
@@ -9,7 +9,7 @@ __all__ = [
     'ApportJobDerived',
     ]
 
-from cStringIO import StringIO
+from io import BytesIO
 
 from lazr.delegates import delegate_to
 import simplejson
@@ -237,7 +237,7 @@ class ProcessApportBlobJob(ApportJobDerived):
                 file_content = attachment['content'].read()
                 file_alias = getUtility(ILibraryFileAliasSet).create(
                     name=attachment['filename'], size=len(file_content),
-                    file=StringIO(file_content),
+                    file=BytesIO(file_content),
                     contentType=attachment['content_type'])
                 attachments_to_store.append({
                     'file_alias_id': file_alias.id,
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to