Patchwork [1,of,4,py3] md5sum: adapt for python 3 support

login
register
mail settings
Submitter Augie Fackler
Date June 15, 2017, 7:32 p.m.
Message ID <9ae07d7aff47d4067215.1497555150@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/21400/
State Accepted
Headers show

Comments

Augie Fackler - June 15, 2017, 7:32 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1497545353 14400
#      Thu Jun 15 12:49:13 2017 -0400
# Node ID 9ae07d7aff47d4067215216a02e5744c8c974a9c
# Parent  9d76812f9b0bdd0af9b4ea68bb16765c591d9b4a
md5sum: adapt for python 3 support

Patch

diff --git a/tests/md5sum.py b/tests/md5sum.py
--- a/tests/md5sum.py
+++ b/tests/md5sum.py
@@ -34,7 +34,7 @@  for filename in sys.argv[1:]:
 
     m = md5()
     try:
-        for data in iter(lambda: fp.read(8192), ''):
+        for data in iter(lambda: fp.read(8192), b''):
             m.update(data)
     except IOError as msg:
         sys.stderr.write('%s: I/O error: %s\n' % (filename, msg))