]> granicus.if.org Git - python/commitdiff
Fixed #1254: pdb fails to launch some script.
authorChristian Heimes <christian@cheimes.de>
Mon, 12 Nov 2007 17:28:45 +0000 (17:28 +0000)
committerChristian Heimes <christian@cheimes.de>
Mon, 12 Nov 2007 17:28:45 +0000 (17:28 +0000)
Lib/pdb.py

index f355d45e6ef52ec94345d4a103034544da50ac99..d4eb8bdb390238220a7a77071625f6ee4474c9f1 100755 (executable)
@@ -1123,7 +1123,7 @@ see no sign that the breakpoint was reached.
         # Start with fresh empty copy of globals and locals and tell the script
         # that it's being run as __main__ to avoid scripts being able to access
         # the pdb.py namespace.
-        globals_ = {"__name__" : "__main__"}
+        globals_ = {"__name__" : "__main__", "__file__" : filename}
         locals_ = globals_
 
         # When bdb sets tracing, a number of call and line events happens