Skip to content

Commit e97ba25

Browse files
committed
Don't pass the realpath of script target to system functions
1 parent 572c780 commit e97ba25

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/pdb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ class _ScriptTarget(_ExecutableTarget):
185185
def __init__(self, target):
186186
self._target = os.path.realpath(target)
187187

188-
if not os.path.exists(self._target):
188+
if not os.path.exists(target):
189189
print(f'Error: {target} does not exist')
190190
sys.exit(1)
191-
if os.path.isdir(self._target):
191+
if os.path.isdir(target):
192192
print(f'Error: {target} is a directory')
193193
sys.exit(1)
194194

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Pdb can run scripts from pseudofiles. Patch by Bartosz Sławecki.

0 commit comments

Comments
 (0)