Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More .format fixes for 2.6 backcompat
  • Loading branch information
pjz committed Oct 31, 2013
1 parent 1bfb06d commit 80db1e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aspen/flow.py
Expand Up @@ -77,17 +77,17 @@ def run(self, state, through=None):
deps = self._resolve_dependencies(function, state)
if 'exc_info' in deps.required and state['exc_info'] is None:
pass # Hook needs an exc_info but we don't have it.
print("{:>48} \x1b[33;1mskipped\x1b[0m".format(function_name))
print("{0:>48} \x1b[33;1mskipped\x1b[0m".format(function_name))
elif 'exc_info' not in deps.names and state['exc_info'] is not None:
pass # Hook doesn't want an exc_info but we have it.
print("{:>48} \x1b[33;1mskipped\x1b[0m".format(function_name))
print("{0:>48} \x1b[33;1mskipped\x1b[0m".format(function_name))
else:
new_state = function(**deps.kw)
print("{:>48} \x1b[32;1mdone\x1b[0m".format(function_name))
print("{0:>48} \x1b[32;1mdone\x1b[0m".format(function_name))
if new_state is not None:
state.update(new_state)
except:
print("{:>48} \x1b[31;1mfailed\x1b[0m".format(function_name))
print("{0:>48} \x1b[31;1mfailed\x1b[0m".format(function_name))
state['exc_info'] = sys.exc_info()[:2] + (traceback.format_exc().strip(),)
if self.short_circuit:
raise
Expand Down

0 comments on commit 80db1e5

Please sign in to comment.