diff cmd2.py @ 216:dcc5f871a5b6

more postparse hook work
author catherine@dellzilla
date Mon, 16 Mar 2009 12:32:39 -0400
parents e9091d9a3a60
children 0a2fd4b5dad7
line wrap: on
line diff
--- a/cmd2.py	Mon Mar 16 03:30:30 2009 -0400
+++ b/cmd2.py	Mon Mar 16 12:32:39 2009 -0400
@@ -545,7 +545,11 @@
             print e
             return 0
 
-        (stop, statement) = self.postparsing_precmd(statement)
+        try:
+            (stop, statement) = self.postparsing_precmd(statement)
+        except Exception, e:
+            print str(e)
+            return 0
         if stop:
             return self.postparsing_postcmd(stop)