scripts/dl_github_archive.py: fix python3 str, bytes confusion v1.5.0-rc3
authorYousong Zhou <yszhou4tech@gmail.com>
Mon, 4 Nov 2019 11:09:38 +0000 (11:09 +0000)
committerRISCi_ATOM <bob@bobcall.me>
Mon, 4 Nov 2019 16:19:02 +0000 (11:19 -0500)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry picked from commit d26738bc767f48d2dee7097cbfc6d07ffeee58fb)

scripts/dl_github_archive.py

index 6c778794f91704df9e6bf98bda487b4dd65e45f8..aa7840066bcfdd2e0d06863297a7b4a42d3a06f9 100755 (executable)
@@ -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)