← Back to team overview

launchpad-reviewers team mailing list archive

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

 

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

Commit message:
Fix upload2librarian for Python 3

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/420134

This is a rarely-used utility script, as evidenced by the fact that it's taken us this long to notice that it was broken on Python 3, but I found a use for it today so I think it's worth keeping it around and applying this trivial fix.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-upload2librarian into launchpad:master.
diff --git a/scripts/upload2librarian.py b/scripts/upload2librarian.py
index 4c89bad..31c2313 100755
--- a/scripts/upload2librarian.py
+++ b/scripts/upload2librarian.py
@@ -52,7 +52,7 @@ class LibrarianUploader(LaunchpadScript):
             file.
         """
         try:
-            file = open(filepath)
+            file = open(filepath, "rb")
         except OSError:
             raise LaunchpadScriptFailure('Could not open: %s' % filepath)