Issue #16261: Converted some bare except statements to except statements

with specified exception type.  Original patch by Ramchandra Apte.
This commit is contained in:
Serhiy Storchaka 2015-05-20 10:33:40 +03:00
parent 492f027793
commit ba9ac5b5c4
7 changed files with 13 additions and 13 deletions

View file

@ -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