]> arthur.barton.de Git - bup.git/commitdiff
get: convert opt.source to bytes
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 4 Feb 2020 20:27:23 +0000 (21:27 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 1 Mar 2020 22:54:29 +0000 (16:54 -0600)
I noticed this while playing with something else that
didn't just pass the repo_dir to git, but instead used
it with some os.path.join() calls that complain about
mixed unicode/bytes.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
cmd/get-cmd.py

index 4a69121b2c7ade2e3ec1d47dc9116738291679e1..95d8f57fabf0328d28996478fe65dedfaa14995e 100755 (executable)
@@ -574,6 +574,8 @@ def main():
     is_reverse = environ.get(b'BUP_SERVER_REVERSE')
     opt = parse_args(sys.argv)
     git.check_repo_or_die()
+    if opt.source:
+        opt.source = argv_bytes(opt.source)
     src_dir = opt.source or git.repo()
     if opt.bwlimit:
         client.bwlimit = parse_num(opt.bwlimit)