daemon: Only automatically save a XML representation of the current

running session when NMF version 1.0 is used.
This commit is contained in:
tgoff0 2015-05-22 00:54:34 +00:00
parent ea4f6ba518
commit 0018be074f

View file

@ -351,8 +351,11 @@ class Session(object):
def runtime_state_hook(self, state): def runtime_state_hook(self, state):
if state == coreapi.CORE_EVENT_RUNTIME_STATE: if state == coreapi.CORE_EVENT_RUNTIME_STATE:
self.emane.poststartup() self.emane.poststartup()
xmlfilename = os.path.join(self.sessiondir, 'session-deployed.xml') xmlfilever = self.cfg['xmlfilever']
savesessionxml(self, xmlfilename, self.cfg['xmlfilever']) if xmlfilever in ('1.0',):
xmlfilename = os.path.join(self.sessiondir,
'session-deployed.xml')
savesessionxml(self, xmlfilename, xmlfilever)
def getenviron(self, state=True): def getenviron(self, state=True):
''' Get an environment suitable for a subprocess.Popen call. ''' Get an environment suitable for a subprocess.Popen call.