daemon: updated open xml with start flag to set instantiation state before running instantiate to be consistent with other cases

This commit is contained in:
Blake Harnden 2020-06-25 21:34:45 -07:00
parent 3bfc299bfd
commit b94d4d3507

View file

@ -637,19 +637,16 @@ class Session:
# clear out existing session # clear out existing session
self.clear() self.clear()
if start: # set state and read xml
state = EventTypes.CONFIGURATION_STATE state = EventTypes.CONFIGURATION_STATE if start else EventTypes.DEFINITION_STATE
else:
state = EventTypes.DEFINITION_STATE
self.set_state(state) self.set_state(state)
self.name = os.path.basename(file_name) self.name = os.path.basename(file_name)
self.file_name = file_name self.file_name = file_name
# write out xml file
CoreXmlReader(self).read(file_name) CoreXmlReader(self).read(file_name)
# start session if needed # start session if needed
if start: if start:
self.set_state(EventTypes.INSTANTIATION_STATE)
self.instantiate() self.instantiate()
def save_xml(self, file_name: str) -> None: def save_xml(self, file_name: str) -> None: