← Back to team overview

launchpad-reviewers team mailing list archive

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

 

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

Commit message:
Fix makeSourcePackageRecipe for Python 3

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

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

Decoding the return value of getUniqueString doesn't work on Python 3, since the return value is already text.  It can just use getUniqueUnicode instead.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-makeSourcePackageRecipe into launchpad:master.
diff --git a/lib/lp/testing/factory.py b/lib/lp/testing/factory.py
index a176d48..03050ad 100644
--- a/lib/lp/testing/factory.py
+++ b/lib/lp/testing/factory.py
@@ -3077,8 +3077,7 @@ class BareLaunchpadObjectFactory(ObjectFactory):
         if name is None:
             name = self.getUniqueUnicode('spr-name')
         if description is None:
-            description = self.getUniqueString(
-                'spr-description').decode('utf8')
+            description = self.getUniqueUnicode('spr-description')
         if daily_build_archive is None:
             daily_build_archive = self.makeArchive(
                 distribution=distroseries.distribution, owner=owner)