projects
/
datasette-pytables.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8608557
)
Convert from bytes to strings
author
Javier Sancho
<jsf@jsancho.org>
Fri, 11 May 2018 10:22:37 +0000
(12:22 +0200)
committer
Javier Sancho
<jsf@jsancho.org>
Fri, 11 May 2018 10:22:37 +0000
(12:22 +0200)
datasette_pytables/__init__.py
patch
|
blob
|
history
diff --git
a/datasette_pytables/__init__.py
b/datasette_pytables/__init__.py
index d44c9f93485e4e187c4ec06f3565da0df6723684..5e37c45d451c21bd8711baafa4ace4c9380af5bb 100644
(file)
--- a/
datasette_pytables/__init__.py
+++ b/
datasette_pytables/__init__.py
@@
-80,7
+80,10
@@
class Connection:
row[field] = table_row.nrow
elif field == '*':
for col in table.colnames:
- row[col] = table_row[col]
+ value = table_row[col]
+ if type(value) is bytes:
+ value = value.decode('utf-8')
+ row[col] = value
else:
row[field] = table_row[field]
rows.append(row)