mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #16261: Converted some bare except statements to except statements
with specified exception type. Original patch by Ramchandra Apte.
This commit is contained in:
parent
492f027793
commit
ba9ac5b5c4
7 changed files with 13 additions and 13 deletions
|
@ -25,7 +25,7 @@ def treat_file(filename, outfp):
|
|||
"""Append tags found in file named 'filename' to the open file 'outfp'"""
|
||||
try:
|
||||
fp = open(filename, 'r')
|
||||
except:
|
||||
except OSError:
|
||||
sys.stderr.write('Cannot open %s\n'%filename)
|
||||
return
|
||||
charno = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue