summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis de Lattre <alexis.delattre@akretion.com>2019-11-13 09:41:56 (GMT)
committerAlexis de Lattre <alexis.delattre@akretion.com>2019-11-13 09:41:56 (GMT)
commitaa1b5a69dc700f27398e0a09143c0ba928359dae (patch)
tree1c41e77ca2227c54f9fcfe59654e4d6b17a3f98b
parent0350366edb6ddfe7387e207d53e04e5052730c52 (diff)
downloadfactur-x-aa1b5a69dc700f27398e0a09143c0ba928359dae.zip
factur-x-aa1b5a69dc700f27398e0a09143c0ba928359dae.tar.gz
factur-x-aa1b5a69dc700f27398e0a09143c0ba928359dae.tar.bz2
[FIX] bug in generate_facturx_from_file() when using argument additional_attachments
Bump version to 1.5
-rw-r--r--README.rst6
-rw-r--r--facturx/_version.py2
-rw-r--r--facturx/facturx.py2
3 files changed, 7 insertions, 3 deletions
diff --git a/README.rst b/README.rst
index a16c05f..309fe29 100644
--- a/README.rst
+++ b/README.rst
@@ -65,9 +65,13 @@ Contributors
Changelog
=========
+* Version 1.5 dated 2019-11-13
+
+ * Fix bug in generate_facturx_from_file() when using argument additional_attachments
+
* Version 1.4 dated 2019-07-24
- * Update Factur-X XSD to the final version of Factur-X v1.0.4
+ * Update Factur-X XSD to the final version of Factur-X v1.0.04
* Support XML extraction with ZUGFeRD invoices using 'zugferd-invoice.xml' filename (instead of the filename 'ZUGFeRD-invoice.xml' specified by the standard)
* Version 1.3 dated 2019-06-12
diff --git a/facturx/_version.py b/facturx/_version.py
index 0f66308..fcb6b5d 100644
--- a/facturx/_version.py
+++ b/facturx/_version.py
@@ -1 +1 @@
-__version__ = '1.4'
+__version__ = '1.5'
diff --git a/facturx/facturx.py b/facturx/facturx.py
index 157fa68..b603ed7 100644
--- a/facturx/facturx.py
+++ b/facturx/facturx.py
@@ -837,7 +837,7 @@ def generate_facturx_from_file(
filename = os.path.basename(attach_filepath)
mod_timestamp = os.path.getmtime(attach_filepath)
mod_dt = datetime.fromtimestamp(mod_timestamp)
- with open(attach_filepath, 'r') as fa:
+ with open(attach_filepath, 'rb') as fa:
fa.seek(0)
additional_attachments_read[fa.read()] = {
'filename': filename,