fix: flake8 warns, setup.py
This commit is contained in:
parent
cfe63a5e83
commit
2e4d02fec3
5
setup.py
5
setup.py
@ -3,9 +3,10 @@
|
||||
from setuptools import setup
|
||||
import os
|
||||
|
||||
rqfiles = [('/usr/share/timmy/' + root, [os.path.join(root, f) for f in files])
|
||||
dtm = os.path.join(os.path.abspath(os.sep), 'usr', 'share', 'timmy')
|
||||
rqfiles = [(os.path.join(dtm, root), [os.path.join(root, f) for f in files])
|
||||
for root, dirs, files in os.walk('rq')]
|
||||
rqfiles.append(('/usr/share/timmy/configs', ['config.yaml', 'rq.yaml']))
|
||||
rqfiles.append((os.path.join(dtm, 'configs'), ['config.yaml', 'rq.yaml']))
|
||||
|
||||
setup(name='timmy',
|
||||
version='1.0',
|
||||
|
@ -124,7 +124,7 @@ def main(argv=None):
|
||||
main_arc,
|
||||
60)
|
||||
if args.only_logs or args.getlogs:
|
||||
lf = os.path.join(gettempdir(),'timmy-logs.lock')
|
||||
lf = os.path.join(gettempdir(), 'timmy-logs.lock')
|
||||
lock = flock.FLock(lf)
|
||||
if lock.lock():
|
||||
size = nm.calculate_log_size(args.maxthreads)
|
||||
|
@ -623,8 +623,8 @@ class NodeManager(object):
|
||||
txtfl.append(logslistfile)
|
||||
try:
|
||||
with open(logslistfile, 'w') as llf:
|
||||
for filename in node.logs_dict():
|
||||
llf.write(filename.lstrip(os.path.abspath(os.sep))+"\0")
|
||||
for fn in node.logs_dict():
|
||||
llf.write(fn.lstrip(os.path.abspath(os.sep))+"\0")
|
||||
except:
|
||||
logging.error("create_archive_logs: Can't write to file %s" %
|
||||
logslistfile)
|
||||
|
Loading…
Reference in New Issue
Block a user