Commit cacea29b authored by Sebastien Robin's avatar Sebastien Robin

genbt5list: prevent conflicts when several process calls genbt5list in parallel

parent 819d824b
......@@ -215,7 +215,8 @@ def main(dir_list=None, **kw):
for d in dir_list:
bt5list = generateInformation(d, **kw).getvalue()
d = os.path.join(d, 'bt5list.new')
# add pid in filename to avoid conflicts if several process calls genbt5list
d = os.path.join(d, 'bt5list.new.%i' % os.getpid())
try:
with open(d, 'wb') as f:
f.write(bt5list)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment