Skip to content

Commit 0d88823

Browse files
committed
Merge branch 'release/v0.0.9'
2 parents 74df725 + 62ed635 commit 0d88823

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.0.9 - 28.Ago.2020
4+
### Bug fixes
5+
- Fix save_file and save_file_signed to save binary files
6+
37
## v0.0.8 - 22.Jun.2020
48
### Features
59
- Ability to use the timeout parameter of the requests

mifiel/document.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ def create_many_from_template(client, args={}):
100100
def save_file(self, path):
101101
url_ = self.url('{}/file').format(self.id)
102102
response = requests.get(url_, auth=self.client.auth)
103-
with open(path, 'w') as file_:
104-
file_.write(response.text)
103+
with open(path, 'wb') as file_:
104+
file_.write(response.content)
105105

106106
def save_file_signed(self, path):
107107
url_ = self.url('{}/file_signed').format(self.id)
108108
response = requests.get(url_, auth=self.client.auth)
109-
with open(path, 'w') as file_:
110-
file_.write(response.text)
109+
with open(path, 'wb') as file_:
110+
file_.write(response.content)
111111

112112
def save_xml(self, path):
113113
url_ = self.url('{}/xml').format(self.id)

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
setup(
99
name='mifiel',
10-
version='0.0.8',
10+
version='0.0.9',
1111
description='Python API Client library for Mifiel.com',
1212
long_description=long_description,
1313
url='http://github.com/mifiel/python-api-client',
14-
download_url='https://github.com/Mifiel/python-api-client/tarball/v0.0.8',
14+
download_url='https://github.com/Mifiel/python-api-client/tarball/v0.0.9',
1515
author='Genaro Madrid',
1616
author_email='genmadrid@gmail.com',
1717
license='MIT',

0 commit comments

Comments
 (0)