Skip to content

Commit 7b27b95

Browse files
author
Art van Scheppingen
committed
Using IO instead of built in for Py2.7 compatibility
1 parent 5b70161 commit 7b27b95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

messagebird/client.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import sys
22
import json
3+
import io
34

45
from messagebird.balance import Balance
56
from messagebird.contact import Contact, ContactList
@@ -94,7 +95,7 @@ def request_store_as_file(self, path, filepath, method='GET', params=None, type=
9495
if not response_binary:
9596
return response_binary
9697

97-
with open(filepath, 'wb') as f:
98+
with io.open(filepath, 'wb') as f:
9899
f.write(response_binary)
99100

100101
return filepath

0 commit comments

Comments
 (0)