mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757)
(cherry picked from commit a4084b9d1e)
Co-authored-by: Konge <zkonge@outlook.com>
			
			
This commit is contained in:
		
							parent
							
								
									deea701b7f
								
							
						
					
					
						commit
						d9106434f7
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		|  | @ -542,7 +542,7 @@ def _test(): | ||||||
|     import argparse |     import argparse | ||||||
| 
 | 
 | ||||||
|     parser = argparse.ArgumentParser() |     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() |     args = parser.parse_args() | ||||||
|     with args.infile as infile: |     with args.infile as infile: | ||||||
|         source = infile.read() |         source = infile.read() | ||||||
|  |  | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  | Fix potential UnicodeDecodeError in dis module. | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)