fix couchup for python3 (#1905)
authorClemens Stolle <klaemo@fastmail.fm>
Thu, 7 Feb 2019 05:54:19 +0000 (06:54 +0100)
committerJoan Touzet <wohali@users.noreply.github.com>
Thu, 7 Feb 2019 05:54:19 +0000 (00:54 -0500)
rel/overlay/bin/couchup

index 4f03759..52d746c 100755 (executable)
@@ -231,7 +231,9 @@ def _replicate(args):
         if args["filter_deleted"]:
             doc["filter"] = "repl_filters/no_deleted"
         if args["creds"]:
-            auth = "Basic " + base64.b64encode(":".join(args["creds"]))
+            auth = (
+                "Basic " + base64.b64encode(":".join(args["creds"]).encode()).decode()
+            )
             headers = {"authorization": auth}
             doc["source"]["headers"] = headers
             doc["target"]["headers"] = headers