This commit is contained in:
Sviatoslav Sydorenko 2017-06-08 08:44:22 +00:00 committed by GitHub
commit f8de2e4621
6 changed files with 9 additions and 14 deletions

View file

@ -3,7 +3,6 @@ from __future__ import print_function
from __future__ import unicode_literals
import argparse
import io
import sys
import xml.sax
@ -16,7 +15,7 @@ def check_xml(argv=None):
retval = 0
for filename in args.filenames:
try:
with io.open(filename, 'rb') as xml_file:
with open(filename, 'rb') as xml_file:
xml.sax.parse(xml_file, xml.sax.ContentHandler())
except xml.sax.SAXException as exc:
print('{}: Failed to xml parse ({})'.format(filename, exc))