nlopes <shelika.v...@gmail.com> added the comment:

That fixes it.
It seems to be introduced when committing a fix for issue #1038.

-bash-3.2$ svn diff -r 58126:58127 Lib/pdb.py
Index: Lib/pdb.py
===================================================================
--- Lib/pdb.py  (revision 58126)
+++ Lib/pdb.py  (revision 58127)
@@ -1166,12 +1166,8 @@
         self._wait_for_mainpyfile = 1
         self.mainpyfile = self.canonic(filename)
         self._user_requested_quit = 0
-        fp = open(filename)
-        try:
-            script = fp.read()
-        finally:
-            fp.close()
-        statement = 'exec("%s")' % script
+        with open(filename) as fp:
+            statement = fp.read()
         self.run(statement)

 # Simplified interface

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6323>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to