Skip to content

Commit 35fb348

Browse files
authored
Merge pull request #2 from alexeykhit/feature/fix
Fix upload photo and entry to_string()
2 parents 1577572 + c4ce026 commit 35fb348

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/atom/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def to_string(self, version=1, encoding=None, pretty_print=None):
344344
if pretty_print and xmlString is not None:
345345
return xmlString(tree_string).toprettyxml()
346346

347-
return tree_string
347+
return tree_string.decode('utf-8')
348348

349349
ToString = to_string
350350

src/atom/http_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ def _send_data_part(data, connection):
510510
# Read the file and send it a chunk at a time.
511511
while 1:
512512
binarydata = data.read(100000)
513-
if binarydata == '': break
513+
if binarydata == b'': break
514514
connection.send(binarydata)
515515
else:
516516
# The data object was not a file.

0 commit comments

Comments
 (0)