simplified code a bit
This commit is contained in:
parent
7a602846ff
commit
14200c5a50
|
@ -561,14 +561,12 @@ class Config:
|
||||||
if int( location_node.getAttribute("seat") ) == int( seat ):
|
if int( location_node.getAttribute("seat") ) == int( seat ):
|
||||||
return location_node
|
return location_node
|
||||||
|
|
||||||
def save(self, file = None):
|
def save(self, file=None):
|
||||||
if file != None:
|
if file is None:
|
||||||
with open(file, 'w') as f:
|
file = self.file
|
||||||
self.doc.writexml(f)
|
|
||||||
else:
|
|
||||||
shutil.move(self.file, self.file+".backup")
|
shutil.move(self.file, self.file+".backup")
|
||||||
with open(self.file, 'w') as f:
|
with open(file, 'w') as f:
|
||||||
self.doc.writexml(f)
|
self.doc.writexml(f)
|
||||||
|
|
||||||
def edit_layout(self, site_name, max, width = None, height = None,
|
def edit_layout(self, site_name, max, width = None, height = None,
|
||||||
fav_seat = None, locations = None):
|
fav_seat = None, locations = None):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user