Avoid warning

This commit is contained in:
Alexis de Lattre 2018-08-04 01:24:00 +02:00
parent 0a5ff44826
commit 7dd14f153b
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ def main(options, arguments):
'2nd argument %s is a directory name (should be a the '
'output XML filename)', out_xml_filename)
sys.exit(1)
pdf_file = open(pdf_filename)
pdf_file = open(pdf_filename, 'rb')
check_xsd = True
if options.disable_xsd_check:
check_xsd = False
@ -72,7 +72,7 @@ def main(options, arguments):
if isfile(out_xml_filename):
logger.warn(
'File %s already exists. Overwriting it!', out_xml_filename)
xml_file = open(out_xml_filename, 'w')
xml_file = open(out_xml_filename, 'wb')
xml_file.write(xml_string)
xml_file.close()
logger.info('File %s generated', out_xml_filename)