From: SPN Salome - CEA Date: Thu, 8 Jun 2017 13:30:27 +0000 (+0200) Subject: bug fix for jobs command with multiple users X-Git-Tag: V8_3_0rc2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=831e2e9cfb55b58f7ad66a4796ec25b84c84e0e7;p=tools%2Fsat.git bug fix for jobs command with multiple users --- diff --git a/src/logger.py b/src/logger.py index 899df63..48c6633 100644 --- a/src/logger.py +++ b/src/logger.py @@ -248,10 +248,12 @@ class Logger(object): + self.config.VARS.command + ".pyconf") dumpedPyconfFilePath = os.path.join(logDir, 'OUT', dumpedPyconfFileName) - f = open(dumpedPyconfFilePath, 'w') - self.config.__save__(f) - f.close() - + try: + f = open(dumpedPyconfFilePath, 'w') + self.config.__save__(f) + f.close() + except IOError: + pass def date_to_datetime(date): '''Little method that gets year, mon, day, hour , diff --git a/src/xmlManager.py b/src/xmlManager.py index 78e84e7..ca8ec61 100644 --- a/src/xmlManager.py +++ b/src/xmlManager.py @@ -53,13 +53,16 @@ class XmlLogFile(object): log_file_path = self.logFile if file_path: log_file_path = file_path - f = open(log_file_path, 'w') - f.write("\n") - if stylesheet: - f.write("\n" % - stylesheet) - f.write(etree.tostring(self.xmlroot, encoding='utf-8')) - f.close() + try: + f = open(log_file_path, 'w') + f.write("\n") + if stylesheet: + f.write("\n" % + stylesheet) + f.write(etree.tostring(self.xmlroot, encoding='utf-8')) + f.close() + except IOError: + pass def add_simple_node(self, node_name, text=None, attrib={}): '''Add a node with some attibutes and text to the root node.