]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport 1.60 from trunk:
authorGuido van Rossum <guido@python.org>
Mon, 13 Jan 2003 21:16:24 +0000 (21:16 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 13 Jan 2003 21:16:24 +0000 (21:16 +0000)
Duh.  The do_EOF() implementation was bogus.  Make it more like
do_quit() -- but print a blank line first.

Lib/pdb.py

index 1f3c1d47eee7dc90e121f3c279ea2680f8c8f9a6..ff7c0709a05c092c30e374941fe518d1cbb600ea 100755 (executable)
@@ -186,9 +186,6 @@ class Pdb(bdb.Bdb, cmd.Cmd):
 
     do_h = cmd.Cmd.do_help
 
-    def do_EOF(self, arg):
-        return 0        # Don't die on EOF
-
     def do_break(self, arg, temporary = 0):
         # break [ ([filename:]lineno | function) [, "condition"] ]
         if not arg:
@@ -505,6 +502,11 @@ class Pdb(bdb.Bdb, cmd.Cmd):
     do_q = do_quit
     do_exit = do_quit
 
+    def do_EOF(self, arg):
+        print
+        self.set_quit()
+        return 1
+
     def do_args(self, arg):
         f = self.curframe
         co = f.f_code