summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorSrinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>2021-07-08 07:16:08 (GMT)
committerGitHub <noreply@github.com>2021-07-08 07:16:08 (GMT)
commit58248d94379b202ccce3e45b1d1830ca47683273 (patch)
treee96253619faf7e782cff59a7b1e9b9173ef22782 /Lib/pdb.py
parentfed2fc4443235fa9669b73817827fd6da88e3417 (diff)
downloadcpython-58248d94379b202ccce3e45b1d1830ca47683273.zip
cpython-58248d94379b202ccce3e45b1d1830ca47683273.tar.gz
cpython-58248d94379b202ccce3e45b1d1830ca47683273.tar.bz2
bpo-41137: Use utf-8 encoding while reading .pdbrc files (GH-21263)
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 1b4ff54..72ebd71 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -166,12 +166,12 @@ class Pdb(bdb.Bdb, cmd.Cmd):
self.rcLines = []
if readrc:
try:
- with open(os.path.expanduser('~/.pdbrc')) as rcFile:
+ with open(os.path.expanduser('~/.pdbrc'), encoding='utf-8') as rcFile:
self.rcLines.extend(rcFile)
except OSError:
pass
try:
- with open(".pdbrc") as rcFile:
+ with open(".pdbrc", encoding='utf-8') as rcFile:
self.rcLines.extend(rcFile)
except OSError:
pass