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

improve some code

parent 9aaf3fdc
......@@ -90,8 +90,6 @@ class Analysis (Component):
self.version = version
self.set_parent_analysis(parent_analysis)
self.results = {}
self.run = None
self.project = None
# Set the temp folder to the ng6 temp folder
ng6conf = NG6ConfigReader()
......@@ -99,9 +97,6 @@ class Analysis (Component):
if id != None : # If not a new analysis
t3mysql = t3MySQLdb()
self.run = Run.get_from_id(self.__get_run_id())
from ng6.project import Project
self.project = Project.get_from_id(self.__get_project_id())
self.directory = t3mysql.select_analysis_directory(id)
logging.getLogger("Analysis.__init__").debug("Building analysis with id=" + str(id) + " [" + str(self) + "]")
else :
......@@ -296,13 +291,11 @@ class Analysis (Component):
if len(file_basenames) != len(set(file_basenames)) :
try : # If there are mids
if self.run :
mids_desc = self.run.get_mids_description()
else :
run_id = self.__get_run_id()
my_run = Run.get_from_id(run_id)
mids_desc = my_run.get_mids_description()
run_id = self.__get_run_id()
my_run = Run.get_from_id(run_id)
mids_desc = my_run.get_mids_description()
gfiles = {}
ungrouped_files = []
what_left = []
......
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