Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ec6724 commit 9a8919eCopy full SHA for 9a8919e
1 file changed
Lib/pdb.py
@@ -142,9 +142,9 @@ def check(self):
142
print('Error:', self.orig, 'is a directory')
143
sys.exit(1)
144
145
- # Replace pdb's dir with script's dir in front of module search path
146
- # if safe_path is not set, otherwise sys.path[0] is not pdb's dir
147
- if not getattr(sys.flags, 'safe_path', None):
+ # If safe_path(-P) is not set, sys.path[0] would be the directory
+ # of pdb, and we should replace it with the directory of the script
+ if not sys.flags.safe_path:
148
sys.path[0] = os.path.dirname(self)
149
150
@property
0 commit comments