From 0018be074f97d19d11ec452a092c3ee370537f8c Mon Sep 17 00:00:00 2001 From: tgoff0 Date: Fri, 22 May 2015 00:54:34 +0000 Subject: [PATCH] daemon: Only automatically save a XML representation of the current running session when NMF version 1.0 is used. --- daemon/core/session.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/daemon/core/session.py b/daemon/core/session.py index f572a51e..51fd7539 100644 --- a/daemon/core/session.py +++ b/daemon/core/session.py @@ -351,8 +351,11 @@ class Session(object): def runtime_state_hook(self, state): if state == coreapi.CORE_EVENT_RUNTIME_STATE: self.emane.poststartup() - xmlfilename = os.path.join(self.sessiondir, 'session-deployed.xml') - savesessionxml(self, xmlfilename, self.cfg['xmlfilever']) + xmlfilever = 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): ''' Get an environment suitable for a subprocess.Popen call.