Commit c959ac6f authored by Jerome Mariette's avatar Jerome Mariette
Browse files

fix bug in get_from_id

parent 816596d5
......@@ -339,19 +339,19 @@ class Run(object):
try:
ng6conf = NG6ConfigReader()
t3mysql = t3MySQLdb()
cfg_file = os.path.join(self.__get_save_directory(), "run.cfg")
cfg_file = os.path.join(ng6conf.get_save_directory() + "/" + t3mysql.select_run_directory(id), "run.cfg")
if os.path.isfile(cfg_file):
logging.getLogger("Run.get_from_id").debug("Building run id=" + str(self.id) + " from " + cfg_file + " config file.")
logging.getLogger("Run.get_from_id").debug("Building run id=" + str(id) + " from " + cfg_file + " config file.")
return Run.get_from_config(cfg_file)
else :
cfg_file = os.path.join(self.__get_work_directory(), "run.cfg")
cfg_file = os.path.join(ng6conf.get_work_directory() + "/" + t3mysql.select_run_directory(id), "run.cfg")
if os.path.isfile(cfg_file):
logging.getLogger("Run.get_from_id").debug("Building run id=" + str(self.id) + " from " + cfg_file + " config file.")
logging.getLogger("Run.get_from_id").debug("Building run id=" + str(id) + " from " + cfg_file + " config file.")
return Run.get_from_config(cfg_file)
else :
logging.getLogger("Run.get_from_id").debug("Error when building run id=" + str(self.id) + ", no config file was found.")
logging.getLogger("Run.get_from_id").debug("Error when building run id=" + str(id) + ", no config file was found.")
except :
logging.getLogger("Run.get_from_id").debug("Impossible to build run id=" + str(self.id))
logging.getLogger("Run.get_from_id").debug("Impossible to build run id=" + str(id))
@staticmethod
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment