Skip to content

Commit

Permalink
fix last change to still work in py2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
darius committed Nov 22, 2010
1 parent 4da70c4 commit 40de8ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyhalp.py
Expand Up @@ -76,8 +76,10 @@ def thunk(): exec code in module_dict
return [format_exc()]
except:
return [format_exc()]
return (([OutputPart(repr(result))] if result is not None else [])
+ ([OutputPart(output)] if output else []))
parts = []
if result is not None: parts.append(OutputPart(repr(result)))
if output: parts.append(OutputPart(output))
return parts

def capturing_stdout(thunk):
stdout = sys.stdout
Expand Down

0 comments on commit 40de8ac

Please sign in to comment.