diff options
| author | Catherine Devlin <catherine.devlin@gmail.com> | 2008-11-07 10:31:38 -0500 |
|---|---|---|
| committer | Catherine Devlin <catherine.devlin@gmail.com> | 2008-11-07 10:31:38 -0500 |
| commit | 22f98966d56c20049ff1f653c23fda4b60404e3b (patch) | |
| tree | ff41779bea2c744a48953eaa05f305c6b7ebeb66 | |
| parent | 3198d7fa6743e3c8afde2db091db58a8bd493e3e (diff) | |
| download | cmd2-git-0.4.3.tar.gz | |
trap errors0.4.3
| -rwxr-xr-x | cmd2.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -330,7 +330,11 @@ class Cmd(cmd.Cmd): self.stdout = tempfile.TemporaryFile()
if statement.output == '>>':
self.stdout.write(getPasteBuffer())
- stop = cmd.Cmd.onecmd(self, statement.statement)
+ try:
+ stop = cmd.Cmd.onecmd(self, statement.statement)
+ except Exception, e:
+ print str(e)
+ return False
try:
if statement.command not in self.excludeFromHistory:
self.history.append(statement.fullStatement)
|
