Commits

Erik Svensson committed f74c8cb

Fixed an Python 3 issue.

  • Participants
  • Parent commits 6448871
  • Tags release-0.10

Comments (0)

Files changed (2)

     elif isinstance(a, list) and isinstance(b, list):
         for v in a:
             if v not in b:
-                errors.append('Value %s missing from b at %s' % (v, root))
+                errors.append('Value %s missing from b at %s' % (v[0:32], root))
         for v in b:
             if v not in a:
-                errors.append('Value %s missing from a at %s' % (v, root))
+                errors.append('Value %s missing from a at %s' % (v[0:32], root))
     else:
         if a != b:
-            errors.append('Value %s != %s at %s' % (a, b, root))
+            errors.append('Value %s != %s at %s' % (a[0:32], b[0:32], root))
     return errors
 
 class TestHTTPHandler(HTTPHandler):

transmissionrpc/client.py

                 might_be_base64 = False
                 try:
                     # check if this is base64 data
-                    base64.b64decode(torrent)
+                    if PY3:
+                        base64.b64decode(torrent.encode('utf-8'))
+                    else:
+                        base64.b64decode(torrent)
                     might_be_base64 = True
                 except Exception:
                     pass