simplified code a bit

This commit is contained in:
fpdb-mme 2009-11-05 00:39:42 +01:00
parent 7a602846ff
commit 14200c5a50

View File

@ -562,12 +562,10 @@ class Config:
return location_node
def save(self, file=None):
if file != None:
with open(file, 'w') as f:
self.doc.writexml(f)
else:
if file is None:
file = self.file
shutil.move(self.file, self.file+".backup")
with open(self.file, 'w') as f:
with open(file, 'w') as f:
self.doc.writexml(f)
def edit_layout(self, site_name, max, width = None, height = None,