2021-03-21 15:58:42

by Johannes Berg

[permalink] [raw]
Subject: [PATCH] bup: cat-file: fix error print

Some variable renaming and bytes issues, if a target cannot
be found in cat-file.

Signed-off-by: Johannes Berg <[email protected]>
---
lib/cmd/cat-file-cmd.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmd/cat-file-cmd.py b/lib/cmd/cat-file-cmd.py
index 388ca03abcbe..ebe27ce43a0a 100755
--- a/lib/cmd/cat-file-cmd.py
+++ b/lib/cmd/cat-file-cmd.py
@@ -56,7 +56,7 @@ resolved = vfs.resolve(repo, target, follow=False)
leaf_name, leaf_item = resolved[-1]
if not leaf_item:
log('error: cannot access %r in %r\n'
- % ('/'.join(name for name, item in resolved), path))
+ % (b'/'.join(name for name, item in resolved), target))
sys.exit(1)

mode = vfs.item_mode(leaf_item)
--
2.30.2