Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
def set(self, k, v):
"""Update timestamp with ``k``."""
fileno = os.open(self.cachef, os.O_RDWR | os.O_CREAT)
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)
try:
fcntl.lockf(fileno, fcntl.LOCK_EX)
self._cache_init(f)
ts = ent[0]
updated = ent[1]
line = '{0} {1} {2}\n'.format(k, ts, updated)
ts = ent[0]
updated = ent[1]
line = '{0} {1} {2}\n'.format(k, ts, updated)
- fout.write(line.encode('utf-8'))
class DownloadGitHubTarball(object):
class DownloadGitHubTarball(object):