Commit 55ea9241 authored by Nicolas Wavrant's avatar Nicolas Wavrant

stack-monitor: prevention of OSError in settings.cgi

parent 6df266b4
...@@ -29,7 +29,10 @@ with open(config_file, 'w') as file: ...@@ -29,7 +29,10 @@ with open(config_file, 'w') as file:
parser.write(file) parser.write(file)
if len(form) > 0: if len(form) > 0:
os.remove("{{ timestamp }}") try:
os.remove("{{ timestamp }}")
except OSError:
pass
print "<h1>Values that can be defined :</h1>" print "<h1>Values that can be defined :</h1>"
print "<form action=\"/index.cgi\" method=\"post\" class=\"pure-form-aligned\">" print "<form action=\"/index.cgi\" method=\"post\" class=\"pure-form-aligned\">"
......
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