Skip to content

Commit

Permalink
Fix missing attribute job.host error and clean up exception printing …
Browse files Browse the repository at this point in the history
…a little.
  • Loading branch information
dan-blanchard committed Dec 9, 2013
1 parent 569a559 commit 59d2a34
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gridmap/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ def __exit__(self, exc_type, exc_value, exc_tb):

# If we encounter an exception, try to kill all jobs
if exc_type is not None:
self.logger.info('Encountered %s, so killing all jobs.', exc_type)
self.logger.info('Encountered %s, so killing all jobs.',
exc_type.__name__)
for job in self.jobs:
# Only kill jobs that are still running
if job.ret != _JOB_NOT_FINISHED:
Expand Down Expand Up @@ -452,7 +453,7 @@ def check_if_alive(self):
self.logger.error("-" * 80)
self.logger.error("Exception: %s", type(job.ret).__name__)
self.logger.error("Job ID: %s", job.jobid)
self.logger.error("Host: %s", job.host)
self.logger.error("Host: %s", job.host_name)
self.logger.error("." * 80)
self.logger.error(job.traceback)
raise job.ret
Expand Down

0 comments on commit 59d2a34

Please sign in to comment.