Skip to content

fix UnicodeDecodeError when printing tuples with binary data #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use repr() for string representation of tuples
  • Loading branch information
zimnukhov committed Aug 2, 2017
commit 876450242eabbc8cae266145d99cac4ed938f307
2 changes: 1 addition & 1 deletion tarantool/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def __str__(self):
}, sort_keys = True, indent = 4)
output = []
for tpl in self._data:
output.extend(("- ", json.dumps(tpl), "\n"))
output.extend(("- ", repr(tpl), "\n"))
if len(output) > 0:
output.pop()
return ''.join(output)
Expand Down
2 changes: 1 addition & 1 deletion tests/suites/test_dml.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_00_02_fill_space(self):
[i, i%5, 'tuple_'+str(i)]
)
def test_00_03_answer_repr(self):
repr_str = """- [1, 1, "tuple_1"]"""
repr_str = """- [1, 1, 'tuple_1']"""
self.assertEqual(repr(self.con.select('space_1', 1)), repr_str)

def test_02_select(self):
Expand Down