Commit 916aa4ae authored by Marco Mariani's avatar Marco Mariani

only attemp to backup existing xml files

parent 93bd4e6a
......@@ -289,7 +289,8 @@ class Computer(object):
# computer configuration did not change, nothing to write
return
self.backup_xml(path_to_archive, path_to_xml)
if os.path.exists(path_to_xml):
self.backup_xml(path_to_archive, path_to_xml)
with open(path_to_xml, 'wb') as fout:
fout.write(new_pretty_xml)
......
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