diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-10-27 20:28:26 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-10-27 20:28:26 +0200 |
commit | 45e233ed6cc4da3770956d904024ba60327e7701 (patch) | |
tree | e62b29d653359e20281420be2bdee0d1bb552611 | |
parent | e1c1f04368fda9eccbc2ea113054e1034453a728 (diff) | |
download | gemato-45e233ed6cc4da3770956d904024ba60327e7701.tar.gz |
verify: Use io.open() instead of os.fdopen()
-rw-r--r-- | gemato/verify.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gemato/verify.py b/gemato/verify.py index 04edc91..7f3ebec 100644 --- a/gemato/verify.py +++ b/gemato/verify.py @@ -6,6 +6,7 @@ import contextlib import errno import fcntl +import io import os import stat @@ -91,7 +92,7 @@ def get_file_metadata(path, hashes): # 4. st_size yield st.st_size - f = os.fdopen(fd, 'rb') + f = io.open(fd, 'rb') except: if opened: os.close(fd) |