chiark
/
gitweb
/
~mdw
/
rsync-backup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8385b2
)
fshash.in: Use `binascii.hexlify' rather than `str.encode("hex")'.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 1 Jun 2024 03:24:08 +0000
(
04:24
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 9 Jun 2024 11:10:59 +0000
(12:10 +0100)
The latter was a much better notation, so it was dropped from Python 3.
fshash.in
patch
|
blob
|
blame
|
history
diff --git
a/fshash.in
b/fshash.in
index 467cddda5fd40967057820cc5430c714b4948782..1f1a34d3b005e864c5a55fbfbd04bcd02d218880 100644
(file)
--- a/
fshash.in
+++ b/
fshash.in
@@
-24,6
+24,7
@@
### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from sys import argv, exc_info, exit, stdin, stdout, stderr
+import binascii as B
import errno as E
import hashlib as H
import optparse as OP
@@
-301,7
+302,7
@@
class HashCache (object):
fi.st = None
fi.err = excval()
return None
- hash =
hash.encode('hex'
)
+ hash =
B.hexlify(hash
)
## Insert a record into the database.
if me._db: