projects
/
openwrt
/
staging
/
zorun.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5428d8
)
scripts/dl_github_archive.py: fix python3 str, bytes confusion
author
Yousong Zhou
<yszhou4tech@gmail.com>
Mon, 4 Nov 2019 11:09:38 +0000
(11:09 +0000)
committer
Yousong Zhou
<yszhou4tech@gmail.com>
Mon, 4 Nov 2019 11:11:19 +0000
(11:11 +0000)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
scripts/dl_github_archive.py
patch
|
blob
|
history
diff --git
a/scripts/dl_github_archive.py
b/scripts/dl_github_archive.py
index 1e91e2899896521786e00bef86efd5e74729ec40..59fd7067be921dbca8987e90880755f2ccfb5315 100755
(executable)
--- 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, 'w
b
+') 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):