if logger:
logger_command = logger
- # Execute the run method of the command
- res = __module__.run(argv, self, logger_command)
-
- # put final attributes in xml log file (end time, total time, ...) and write it
- logger_command.endWrite()
+ try:
+ # Execute the run method of the command
+ res = __module__.run(argv, self, logger_command)
+ finally:
+ # put final attributes in xml log file (end time, total time, ...) and write it
+ logger_command.endWrite()
return res
def endWrite(self):
self.write(_('\nTap the following command to get the log :\n'), screenOnly=True)
- self.write('%s/sat log\n' % self.config.VARS.salometoolsway, screenOnly=True)
+ if 'APPLICATION' in self.config:
+ self.write('%s/sat log %s\n' % (self.config.VARS.salometoolsway, self.config.VARS.application), screenOnly=True)
+ else:
+ self.write('%s/sat log\n' % self.config.VARS.salometoolsway, screenOnly=True)
dt = datetime.datetime.now()
endtime = dt.strftime('%Y%m%d_%H%M%S')