Skip to content

Commit

Permalink
Merge pull request #371 from babsey/script_content_error
Browse files Browse the repository at this point in the history
Correct argument for content function in git working copy
  • Loading branch information
apdavison authored Sep 11, 2017
2 parents 1629809 + 7b2f2d7 commit d5cc713
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sumatra/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ def run(self, with_label=False, project=None):
<https://docs.python.org/2/library/subprocess.html\
#subprocess.Popen.returncode>`_ %d" % result)
logger.debug(" Run failed.")

self.add_tag(STATUS_FORMAT % (status + "..."))
if project:
project.save_record(self)
logger.debug("Record saved @ gathering.")
self.add_tag(STATUS_FORMAT % status)

self.duration = time.time() - start_time

# try to get stdout_stderr from launch_mode
Expand All @@ -215,7 +215,7 @@ def run(self, with_label=False, project=None):
if self.parameters and exists(self.parameter_file):
time.sleep(0.5) # execution of matlab: parameter_file is not always deleted immediately
os.remove(self.parameter_file)

return result

def __repr__(self):
Expand Down Expand Up @@ -276,7 +276,7 @@ def script_content(self):
"""
wc = get_working_copy()
try:
return wc.content(self.version, file=self.main_file)
return wc.content(self.version, self.main_file)
except:
return False

Expand Down

0 comments on commit d5cc713

Please sign in to comment.