Skip to content

Commit

Permalink
Indentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Dec 30, 2017
1 parent 03fae0f commit 46fc934
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/galaxy/tools/actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,11 @@ def _remap_job_on_rerun(self, trans, galaxy_session, rerun_remap_job_id, current
try:
old_job = trans.sa_session.query(trans.app.model.Job).get(rerun_remap_job_id)
assert old_job is not None, '(%s/%s): Old job id is invalid' % (rerun_remap_job_id, current_job.id)
assert old_job.tool_id == current_job.tool_id, '(%s/%s): Old tool id (%s) does not match rerun tool id (%s)' % (
old_job.id, current_job.id, old_job.tool_id, current_job.tool_id)
assert old_job.tool_id == current_job.tool_id, '(%s/%s): Old tool id (%s) does not match rerun tool id (%s)' % (old_job.id, current_job.id, old_job.tool_id, current_job.tool_id)
if trans.user is not None:
assert old_job.user_id == trans.user.id, '(%s/%s): Old user id (%s) does not match rerun user id (%s)' % (
old_job.id, current_job.id, old_job.user_id, trans.user.id)
assert old_job.user_id == trans.user.id, '(%s/%s): Old user id (%s) does not match rerun user id (%s)' % (old_job.id, current_job.id, old_job.user_id, trans.user.id)
elif trans.user is None and type(galaxy_session) == trans.model.GalaxySession:
assert old_job.session_id == galaxy_session.id, '(%s/%s): Old session id (%s) does not match rerun session id (%s)' % (
old_job.id, current_job.id, old_job.session_id, galaxy_session.id)
assert old_job.session_id == galaxy_session.id, '(%s/%s): Old session id (%s) does not match rerun session id (%s)' % (old_job.id, current_job.id, old_job.session_id, galaxy_session.id)
else:
raise Exception('(%s/%s): Remapping via the API is not (yet) supported' % (old_job.id, current_job.id))
# Duplicate PJAs before remap.
Expand All @@ -530,8 +527,7 @@ def _remap_job_on_rerun(self, trans, galaxy_session, rerun_remap_job_id, current
p.value = json.dumps(input_values[p.name])
jtid.dataset = out_data[jtod.name]
jtid.dataset.hid = jtod.dataset.hid
log.info('Job %s input HDA %s remapped to new HDA %s' % (
job_to_remap.id, jtod.dataset.id, jtid.dataset.id))
log.info('Job %s input HDA %s remapped to new HDA %s' % (job_to_remap.id, jtod.dataset.id, jtid.dataset.id))
trans.sa_session.add(job_to_remap)
trans.sa_session.add(jtid)
jtod.dataset.visible = False
Expand Down

0 comments on commit 46fc934

Please sign in to comment.