From: Yousong Zhou Date: Mon, 4 Nov 2019 11:09:38 +0000 (+0000) Subject: scripts/dl_github_archive.py: fix python3 str, bytes confusion X-Git-Tag: v1.5.0-rc3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=52798754c8235666eca84147dc1c003ff72058b2;p=librecmc%2Flibrecmc.git scripts/dl_github_archive.py: fix python3 str, bytes confusion Signed-off-by: Yousong Zhou (cherry picked from commit d26738bc767f48d2dee7097cbfc6d07ffeee58fb) --- diff --git a/scripts/dl_github_archive.py b/scripts/dl_github_archive.py index 6c778794f9..aa7840066b 100755 --- a/scripts/dl_github_archive.py +++ b/scripts/dl_github_archive.py @@ -177,7 +177,7 @@ class GitHubCommitTsCache(object): def set(self, k, v): """Update timestamp with ``k``.""" fileno = os.open(self.cachef, os.O_RDWR | os.O_CREAT) - with os.fdopen(fileno, 'wb+') as f: + with os.fdopen(fileno, 'w+') as f: try: fcntl.lockf(fileno, fcntl.LOCK_EX) self._cache_init(f)