Fabian Büchler  committed 3dfeac0

Fixed unicode error in hgbb.bb_followers.

  • Participants
  • Parent commits 02748cd

Comments (0)

Files changed (1)

                          None, False)
     followers = json.loads(retval)
     ui.write("List of followers:\n")
+    encode = lambda t: t.encode('utf-8') if isinstance(t, unicode) else t
     for follower in sorted(followers.get(u'followers', [])):
-        ui.write("    %s (%s %s)\n" % (
+        ui.write("    %s (%s %s)\n" % tuple(map(encode, (
-            follower['last_name']))
+            follower['last_name']))))
 def bb_link(ui, repo, filename=None, **opts):
     '''display a bitbucket link to the repository, or the the specific file if given'''