From c79c446bf0d329cb118b4b52e9b55c1272417701 Mon Sep 17 00:00:00 2001
From: Stefano Zacchiroli <zack@upsilon.cc>
Date: Sun, 14 Jan 2018 14:54:58 +0100
Subject: [PATCH] swh-hash-file: make sure that paths are passed on as bytes

---
 bin/swh-hash-file | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/swh-hash-file b/bin/swh-hash-file
index 7ad22a8d..c30de78f 100755
--- a/bin/swh-hash-file
+++ b/bin/swh-hash-file
@@ -15,7 +15,7 @@ HASH_ALGO = 'sha1_git'
 
 
 def hash_file(fname):
-    return hash_to_hex(Content.from_file(path=fname).hash)
+    return hash_to_hex(Content.from_file(path=fname.encode()).hash)
 
 
 def main(fnames):
-- 
GitLab