Commit 2d7be8cf authored by Alain Takoudjou's avatar Alain Takoudjou

notifier: do not fail if feed files was rotated

/reviewed-on nexedi/slapos.toolbox!32
parent 9d6485ab
......@@ -116,7 +116,8 @@ def main():
try:
shutil.copy2(args.logfile[0], temp_file)
except IOError:
error_message = "ERROR ON WRITING FEED"
# previous feed can be rotated, only pass
pass
try:
with open(temp_file, 'a') as file_:
csvfile = csv.writer(file_)
......@@ -127,8 +128,8 @@ def main():
'slapos:%s' % uuid.uuid4(),
])
os.rename(temp_file, args.logfile[0])
except:
error_message = "ERROR ON WRITING FEED"
except Exception, e:
error_message = "ERROR ON WRITING FEED - %s" % str(e)
finally:
try:
os.remove(temp_file)
......
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