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 3058faf commit 4ca2bcfCopy full SHA for 4ca2bcf
Lib/pdb.py
@@ -183,15 +183,15 @@ class _ExecutableTarget:
183
184
class _ScriptTarget(_ExecutableTarget):
185
def __init__(self, target):
186
- if not os.path.exists(target):
+ self._target = self._safe_realpath(target)
187
+
188
+ if not os.path.exists(self._target):
189
print(f'Error: {target} does not exist')
190
sys.exit(1)
- if os.path.isdir(target):
191
+ if os.path.isdir(self._target):
192
print(f'Error: {target} is a directory')
193
194
- self._target = self._safe_realpath(target)
-
195
# If PYTHONSAFEPATH (-P) is not set, sys.path[0] is the directory
196
# of pdb, and we should replace it with the directory of the script
197
if not sys.flags.safe_path:
0 commit comments