logging.getLogger("Analysis.__init__").debug("Building brand new analysis ["+str(self)+"]")
...
...
@@ -144,8 +141,11 @@ class Analysis (Component):
# first create the output directory
ifnotos.path.isdir(self.output_directory):
os.makedirs(self.output_directory,0751)
# first add analysis information
# and analysis output
ifnotos.path.isdir(self.__get_work_directory()):
os.makedirs(self.__get_work_directory(),0751)
# then add analysis information
self.define_analysis()
# serialized the object
...
...
@@ -182,24 +182,26 @@ class Analysis (Component):
"""
Synchronize data related to the Analysis between temporary folder and long term storage folder.
"""
logging.getLogger("Analysis.sync").debug("Synchronizing analysis id="+str(self.id)+" from "+self.__get_work_directory()+" to "+self.__get_save_directory())
logging.getLogger("Analysis.sync").debug("Synchronizing analysis id="+str(self.id)+" from "+self.__get_work_directory()+" to "+self.__get_save_directory())
logging.getLogger("Analysis.sync").error("Error when synchronizing analysis id="+str(self.id)+"(retcode="+str(retcode)+")")
else:
try:os.rmdir(self.__get_work_directory())
except:pass
logging.getLogger("Analysis.sync").debug("Synchronization done for analysis id="+str(self.id)+"(retcode="+str(retcode)+")")
else:
logging.getLogger("Analysis.sync").debug("Synchronization done for analysis id="+str(self.id)+"(retcode="+str(retcode)+")")
else:
logging.getLogger("Analysis.sync").info("The synchronisation has not been performed, either because "+self.__get_work_directory()+" does not exists or because the source and destination folders are the same.")
exceptException,err:
raiseException(str(err))
logging.getLogger("Analysis.sync").info("The synchronisation has not been performed, either because "+self.__get_work_directory()+" does not exists or because the source and destination folders are the same.")