Skip to content

Commit

Permalink
Re #7405 Fix submission
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Jul 9, 2013
1 parent 28afe6d commit f94516a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def to_batch(self):

for item in self._observers:
if item.state() is not None:
if state.__class__.__name__=="SampleData":
if item.state().__class__.__name__=="DataSets":
script += item.state().to_script(data_file=data_file)
else:
script += str(item.state())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ def reset(self):
super(DataSets, self).reset()
self.background.reset()

def to_script(self):
def to_script(self, data_file=None):
"""
Generate reduction script
@param execute: if true, the script will be executed
"""
script_sample = super(DataSets, self).to_script()
script_sample = super(DataSets, self).to_script(data_file)
script_bck = self.background.to_script()
return "%s\n%s" % (script_sample, script_bck)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def reset(self):
self.combine_transmission_frames = SampleData.combine_transmission_frames
self.calculate_transmission = SampleData.calculate_transmission

def to_script(self):
def to_script(self, data_file=None):
"""
Generate reduction script
@param execute: if true, the script will be executed
"""
script = super(SampleData, self).to_script()
script = super(SampleData, self).to_script(data_file)
if self.calculate_transmission:
script += "CombineTransmissionFits(%s)\n" % self.combine_transmission_frames
return script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def to_script(self, data_file=None):
for f in data_file_list:
script += "AppendDataFile([\"%s\"])\n" % f
else:
parts = os.path.split(str(self.data_files[str(data_file)]).strip())
parts = os.path.split(str(data_file).strip())
if len(parts[0])>0:
script += "DataPath(\"%s\")\n" % parts[0]
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _update_content(self):
self._content.job_table.setItem(i, 4, item)

self._content.job_table.setSortingEnabled(True)
self._content.job_table.sortItems(0, 1)
self._content.job_table.sortItems(3, 1)

def get_state(self):
return RemoteJobs()

0 comments on commit f94516a

Please sign in to comment.