aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2019-11-04 11:09:38 +0000
committerYousong Zhou <yszhou4tech@gmail.com>2019-11-04 11:11:19 +0000
commitd26738bc767f48d2dee7097cbfc6d07ffeee58fb (patch)
tree7f30c0711b0b56ae3ebdbea1f4b1b0c2c2593508 /scripts
parenta5428d8c9b69f4c227a6bfd3d9eebf7801876e87 (diff)
downloadupstream-d26738bc767f48d2dee7097cbfc6d07ffeee58fb.tar.gz
upstream-d26738bc767f48d2dee7097cbfc6d07ffeee58fb.tar.bz2
upstream-d26738bc767f48d2dee7097cbfc6d07ffeee58fb.zip
scripts/dl_github_archive.py: fix python3 str, bytes confusion
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dl_github_archive.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/dl_github_archive.py b/scripts/dl_github_archive.py
index 1e91e28998..59fd7067be 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)
@@ -203,7 +203,7 @@ class GitHubCommitTsCache(object):
ts = ent[0]
updated = ent[1]
line = '{0} {1} {2}\n'.format(k, ts, updated)
- fout.write(line.encode('utf-8'))
+ fout.write(line)
class DownloadGitHubTarball(object):