提交 2a3d24c4 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Flake8 for gof/compilelock.py

上级 c789ce95
......@@ -102,8 +102,8 @@ def get_lock(lock_dir=None, **kw):
# the lock state and raise an error.
while get_lock.n_lock > 0:
release_lock()
raise Exception("For some unknow reason, the lock was already taken,"
" but no start time was registered.")
raise Exception("For some unknow reason, the lock was already "
"taken, but no start time was registered.")
now = time.time()
if now - get_lock.start_time > config.compile.timeout/2:
lockpath = os.path.join(get_lock.lock_dir, 'lock')
......@@ -242,7 +242,7 @@ def lock(tmp_dir, timeout=notset, min_wait=None, max_wait=None, verbosity=1):
continue
if last_owner == read_owner:
if (timeout is not None and
time.time() - time_start >= timeout):
time.time() - time_start >= timeout):
# Timeout exceeded or locking process dead.
if not no_display:
if read_owner == 'failure':
......
......@@ -273,7 +273,6 @@ whitelist_flake8 = [
"gof/__init__.py",
"gof/cc.py",
"gof/opt.py",
"gof/compilelock.py",
"gof/link.py",
"gof/sched.py",
"gof/toolbox.py",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论