# Construct xml log file location for sat prints.
logFileName = config.VARS.datehour + "_" + config.VARS.command + ".xml"
- logFilePath = os.path.join(config.SITE.log.logDir, logFileName)
+ logFilePath = os.path.join(config.SITE.log.log_dir, logFileName)
# Construct txt file location in order to log
# the external commands calls (cmake, make, git clone, etc...)
txtFileName = config.VARS.datehour + "_" + config.VARS.command + ".txt"
- txtFilePath = os.path.join(config.SITE.log.logDir, "OUT", txtFileName)
+ txtFilePath = os.path.join(config.SITE.log.log_dir, "OUT", txtFileName)
src.ensure_path_exists(os.path.dirname(logFilePath))
src.ensure_path_exists(os.path.dirname(txtFilePath))
# Call the method to write the xml file on the hard drive
self.xmlFile.write_tree(stylesheet = "command.xsl")
+ # Dump the config in a pyconf file in the log directory
+ logDir = self.config.SITE.log.log_dir
+ dumpedPyconfFileName = (self.config.VARS.datehour
+ + "_"
+ + self.config.VARS.command
+ + ".pyconf")
+ dumpedPyconfFilePath = os.path.join(logDir, 'OUT', dumpedPyconfFileName)
+ f = open(dumpedPyconfFilePath, 'w')
+ self.config.__save__(f)
+ f.close()
+
def date_to_datetime(date):
'''Little method that gets year, mon, day, hour ,