summaryrefslogtreecommitdiffstats
path: root/Lib/dis.py
diff options
context:
space:
mode:
authorKonge <zkonge@outlook.com>2020-08-08 03:03:09 (GMT)
committerGitHub <noreply@github.com>2020-08-08 03:03:09 (GMT)
commita4084b9d1e40c1c9259372263d1fe8c8a562b093 (patch)
treebf5134ebcc4355c4e9b843a63347aed524b398fc /Lib/dis.py
parent705f14556545699ab615ec98f707b438f9603767 (diff)
downloadcpython-a4084b9d1e40c1c9259372263d1fe8c8a562b093.zip
cpython-a4084b9d1e40c1c9259372263d1fe8c8a562b093.tar.gz
cpython-a4084b9d1e40c1c9259372263d1fe8c8a562b093.tar.bz2
bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757)
Diffstat (limited to 'Lib/dis.py')
-rw-r--r--Lib/dis.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/dis.py b/Lib/dis.py
index 10e5f7f..e289e17 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -542,7 +542,7 @@ def _test():
import argparse
parser = argparse.ArgumentParser()
- parser.add_argument('infile', type=argparse.FileType(), nargs='?', default='-')
+ parser.add_argument('infile', type=argparse.FileType('rb'), nargs='?', default='-')
args = parser.parse_args()
with args.infile as infile:
source = infile.read()