diff options
-rw-r--r-- | Lib/bdb.py | 21 |
1 files changed, 9 insertions, 12 deletions
@@ -361,10 +361,9 @@ class Bdb: if not isinstance(cmd, types.CodeType): cmd = cmd+'\n' try: - try: - exec(cmd, globals, locals) - except BdbQuit: - pass + exec(cmd, globals, locals) + except BdbQuit: + pass finally: self.quitting = 1 sys.settrace(None) @@ -380,10 +379,9 @@ class Bdb: if not isinstance(expr, types.CodeType): expr = expr+'\n' try: - try: - return eval(expr, globals, locals) - except BdbQuit: - pass + return eval(expr, globals, locals) + except BdbQuit: + pass finally: self.quitting = 1 sys.settrace(None) @@ -399,10 +397,9 @@ class Bdb: sys.settrace(self.trace_dispatch) res = None try: - try: - res = func(*args, **kwds) - except BdbQuit: - pass + res = func(*args, **kwds) + except BdbQuit: + pass finally: self.quitting = 1 sys.settrace(None) |