Improve Python3 support in get_facturx_xml_from_pdf()
Fix the meaning of an error message
This commit is contained in:
parent
d19d4ce939
commit
9198ce07d9
|
@ -86,6 +86,10 @@ Contributors
|
|||
Changelog
|
||||
=========
|
||||
|
||||
* Version 1.9 dated 2020-02-11
|
||||
|
||||
* Improve Python3 support in get_facturx_xml_from_pdf()
|
||||
|
||||
* Version 1.8 dated 2020-01-16
|
||||
|
||||
* New tool facturx-webservice which implements a REST webservice using Flask to generate a Factur-X PDF invoice via a simple POST request.
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = '1.8'
|
||||
__version__ = '1.9'
|
||||
|
|
|
@ -245,8 +245,8 @@ def get_facturx_xml_from_pdf(pdf_invoice, check_xsd=True):
|
|||
if not pdf_invoice:
|
||||
raise ValueError('Missing pdf_invoice argument')
|
||||
if not isinstance(check_xsd, bool):
|
||||
raise ValueError('Missing pdf_invoice argument')
|
||||
if isinstance(pdf_invoice, str):
|
||||
raise ValueError('Bad type for check_xsd argument')
|
||||
if isinstance(pdf_invoice, (str, bytes)):
|
||||
pdf_file = BytesIO(pdf_invoice)
|
||||
elif isinstance(pdf_invoice, file):
|
||||
pdf_file = pdf_invoice
|
||||
|
|
Loading…
Reference in New Issue