Skip to content

Commit 4fd050e

Browse files
committed
ensure remote pdb script is readable
1 parent 742d5b5 commit 4fd050e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/pdb.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
import code
7676
import glob
7777
import json
78+
import stat
7879
import token
7980
import types
8081
import atexit
@@ -3418,6 +3419,8 @@ def attach(pid, commands=()):
34183419
)
34193420
)
34203421
connect_script.close()
3422+
orig_mode = os.stat(connect_script.name).st_mode
3423+
os.chmod(connect_script.name, orig_mode | stat.S_IROTH | stat.S_IRGRP)
34213424
sys.remote_exec(pid, connect_script.name)
34223425

34233426
# TODO Add a timeout? Or don't bother since the user can ^C?

0 commit comments

Comments
 (0)