This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 3ed8f5f resolve python2 str() issue (#4030)
3ed8f5f is described below
commit 3ed8f5fc23e9cec1324b668aa9c3c5e2e9cac58f
Author: timifasubaa <[email protected]>
AuthorDate: Sat Dec 9 14:23:24 2017 -0800
resolve python2 str() issue (#4030)
* make string conversion use utf8
* Update viz.py
* make utf-8 consistent with other usages
* Update viz.py
* Update viz.py
---
superset/viz.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/superset/viz.py b/superset/viz.py
index e3c1737..0eeed23 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -27,7 +27,7 @@ import numpy as np
import pandas as pd
from pandas.tseries.frequencies import to_offset
import simplejson as json
-from six import PY3, string_types
+from six import PY3, string_types, text_type
from six.moves import reduce
from superset import app, cache, get_manifest_file, utils
@@ -1300,9 +1300,9 @@ class DistributionBarViz(DistributionPieViz):
for i, v in ys.iteritems():
x = i
if isinstance(x, (tuple, list)):
- x = ', '.join([str(s) for s in x])
+ x = ', '.join([text_type(s) for s in x])
else:
- x = str(x)
+ x = text_type(x)
values.append({
'x': x,
'y': v,
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].