Skip to content

Commit

Permalink
scripts/dl_github_archive.py: fix python3 str, bytes confusion
Browse files Browse the repository at this point in the history
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  • Loading branch information
yousong committed Nov 4, 2019
1 parent a5428d8 commit d26738b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/dl_github_archive.py
Expand Up @@ -177,7 +177,7 @@ def get(self, k):
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)
Expand All @@ -203,7 +203,7 @@ def _cache_flush(self, fout):
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):
Expand Down

0 comments on commit d26738b

Please sign in to comment.