Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit de9444e

Browse filesBrowse files
[3.14] gh-134546: ensure remote pdb script is readable (GH-134552) (#134616)
gh-134546: ensure remote pdb script is readable (GH-134552) (cherry picked from commit 74a9c60) Co-authored-by: Anthony Sottile <asottile@umich.edu>
1 parent 576177d commit de9444e
Copy full SHA for de9444e

File tree

2 files changed

+4
-0
lines changed
Filter options

2 files changed

+4
-0
lines changed

‎Lib/pdb.py

Copy file name to clipboardExpand all lines: Lib/pdb.py
+3Lines 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
@@ -3419,6 +3420,8 @@ def attach(pid, commands=()):
34193420
)
34203421
)
34213422
connect_script.close()
3423+
orig_mode = os.stat(connect_script.name).st_mode
3424+
os.chmod(connect_script.name, orig_mode | stat.S_IROTH | stat.S_IRGRP)
34223425
sys.remote_exec(pid, connect_script.name)
34233426

34243427
# TODO Add a timeout? Or don't bother since the user can ^C?
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ensure :mod:`pdb` remote debugging script is readable by remote Python process.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.