Comment 1 for bug 1905450

Revision history for this message
Dan Watkins (oddbloke) wrote :

Applying the below as quilt patch addressed both this and a related issue locally, meaning I could use this command successfully:

--- a/bin/lp-project-upload
+++ b/bin/lp-project-upload
@@ -123,7 +123,7 @@
             release = create_release(proj, version)

         # Get the file contents.
- file_content = open(tarball, 'r').read()
+ file_content = open(tarball, 'rb').read()
         # Get the signature, if available.
         signature = tarball + '.asc'
         if not os.path.exists(signature):
@@ -133,7 +133,7 @@
                 print('gpg failed, aborting', file=sys.stderr)

         if os.path.exists(signature):
- signature_content = open(signature, 'r').read()
+ signature_content = open(signature, 'rb').read()
         else:
             signature_content = None