diff options
Diffstat (limited to 'minidinstall/misc.py')
| -rw-r--r-- | minidinstall/misc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/minidinstall/misc.py b/minidinstall/misc.py index 94fe291..372c450 100644 --- a/minidinstall/misc.py +++ b/minidinstall/misc.py @@ -2,7 +2,7 @@ # misc tools for mini-dinstall -# Copyright © 2004 Thomas Viehmann <tv@beamnet.de> +# Copyright © 2004 Thomas Viehmann <tv@beamnet.de> # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ def dup2(fd,fd2): try: os.dup2(fd,fd2) success = 1 - except OSError, e: + except OSError as e: if (e.errno != errno.EBUSY) or (tries >= 3): raise # wait 0-2 seconds befor next try @@ -55,7 +55,7 @@ def get_file_sum(self, type, filename): elif type == 'sha256': sum = hashlib.sha256() self._logger.debug("Generate %s (python-internal) for %s" % (type, filename)) - f = open(filename) + f = open(filename,'rb') buf = f.read(8192) while buf != '': sum.update(buf) |
