]> arthur.barton.de Git - bup.git/commitdiff
version: fix --date argument for py3
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 5 Aug 2020 19:17:13 +0000 (21:17 +0200)
committerRob Browning <rlb@defaultvalue.org>
Sat, 8 Aug 2020 16:43:49 +0000 (11:43 -0500)
This has an issue with str vs. bytes, fix it.

Reported-by: Mark J Hewitt <mjh@idnet.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/cmd/version-cmd.py

index dac15e856cd728e53a0ff6f823500a829bf55350..bc1329c7cce8bf5c4ca230894ce1da3242b69d14 100755 (executable)
@@ -42,7 +42,7 @@ sys.stdout.flush()
 out = byte_stream(sys.stdout)
 
 if opt.date:
-    out.write(version.date.split(' ')[0] + b'\n')
+    out.write(version.date.split(b' ')[0] + b'\n')
 elif opt.commit:
     out.write(version.commit + b'\n')
 else: