Skip to content

Commit

Permalink
Make safepath work with 3.11-
Browse files Browse the repository at this point in the history
  • Loading branch information
gaogaotiantian committed May 1, 2024
1 parent 1290a8e commit f09b48a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coredumpy/coredumpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, target):

# If safe_path(-P) is not set, sys.path[0] is the directory
# of pdb, and we should replace it with the directory of the script
if not sys.flags.safe_path:
if not getattr(sys.flags, "safe_path", None):
sys.path[0] = os.path.dirname(self._target)

def __repr__(self):
Expand Down

0 comments on commit f09b48a

Please sign in to comment.