Merge ~cjwatson/launchpad:py3-makePackageDiff-bytes into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 2f4798d4f0544c1e0dfc5bf3ceeff39022c8f8f1
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:py3-makePackageDiff-bytes
Merge into: launchpad:master
Diff against target: 13 lines (+1/-1)
1 file modified
lib/lp/testing/factory.py (+1/-1)
Reviewer Review Type Date Requested Status
Thiago F. Pappacena (community) Approve
Review via email: mp+393781@code.launchpad.net

Commit message

Fix makePackageDiff for Python 3

Description of the change

The diff content should be bytes, not text.

To post a comment you must log in.
Revision history for this message
Thiago F. Pappacena (pappacena) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/testing/factory.py b/lib/lp/testing/factory.py
2index b2cf34f..14e917d 100644
3--- a/lib/lp/testing/factory.py
4+++ b/lib/lp/testing/factory.py
5@@ -4490,7 +4490,7 @@ class BareLaunchpadObjectFactory(ObjectFactory):
6 if date_fulfilled is None:
7 date_fulfilled = UTC_NOW
8 if diff_content is None:
9- diff_content = self.getUniqueString("packagediff")
10+ diff_content = self.getUniqueBytes("packagediff")
11 lfa = self.makeLibraryFileAlias(
12 filename=diff_filename, content=diff_content)
13 return ProxyFactory(

Subscribers

People subscribed via source and target branches

to status/vote changes: