Browse Source

bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757)

pull/21792/head
Konge 6 years ago
committed by GitHub
parent
commit
a4084b9d1e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Lib/dis.py
  2. 1
      Misc/NEWS.d/next/Library/2020-08-07-06-06-29.bpo-41497.aBtsWz.rst

2
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()

1
Misc/NEWS.d/next/Library/2020-08-07-06-06-29.bpo-41497.aBtsWz.rst

@ -0,0 +1 @@
Fix potential UnicodeDecodeError in dis module.
Loading…
Cancel
Save