]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/helpers.py
Make adjustments to fix tbloom for python 3
[bup.git] / lib / bup / helpers.py
index b962b73fb6d862e7b03e8c09a334db1cbbd569e8..64d5b26bfcbdf7d5e919f247819ac313a3486174 100644 (file)
@@ -149,7 +149,7 @@ def log(s):
     """Print a log message to stderr."""
     global _last_prog
     sys.stdout.flush()
-    _hard_write(sys.stderr.fileno(), s)
+    _hard_write(sys.stderr.fileno(), s if isinstance(s, bytes) else s.encode())
     _last_prog = 0