updated open_xml functionality, grpc open_xml can optionally start now, added opened files to grpc get_sessions
This commit is contained in:
parent
0a689a3e96
commit
f39b7e9f96
6 changed files with 29 additions and 16 deletions
|
@ -820,19 +820,24 @@ class Session(object):
|
|||
:param bool start: instantiate session if true, false otherwise
|
||||
:return: nothing
|
||||
"""
|
||||
logging.info("opening xml: %s", file_name)
|
||||
|
||||
# clear out existing session
|
||||
self.clear()
|
||||
|
||||
if start:
|
||||
self.set_state(EventTypes.CONFIGURATION_STATE)
|
||||
state = EventTypes.CONFIGURATION_STATE
|
||||
else:
|
||||
state = EventTypes.DEFINITION_STATE
|
||||
self.set_state(state)
|
||||
self.name = os.path.basename(file_name)
|
||||
self.file_name = file_name
|
||||
|
||||
# write out xml file
|
||||
CoreXmlReader(self).read(file_name)
|
||||
|
||||
# start session if needed
|
||||
if start:
|
||||
self.name = os.path.basename(file_name)
|
||||
self.file_name = file_name
|
||||
self.instantiate()
|
||||
|
||||
def save_xml(self, file_name):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue