Skip to content

Commit 6695cd1

Browse files
author
Ilya Volodarsky
committed
fixing unicode string as trait and event property value and bump version
1 parent 04f0fd3 commit 6695cd1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

analytics/client.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def request(client, url, data):
6363

6464
log('debug', 'Sending request to Segment.io ...')
6565
try:
66+
6667
response = requests.post(url, data=json.dumps(data),
6768
headers={'content-type': 'application/json'})
6869

@@ -163,7 +164,7 @@ def _clean(self, d):
163164
to_delete = []
164165
for key in d.iterkeys():
165166
val = d[key]
166-
if not isinstance(val, (str, int, long, float, bool, datetime.datetime)):
167+
if not isinstance(val, (str, unicode, int, long, float, bool, datetime.datetime)):
167168
log('warn', 'Dictionary values must be strings, integers, ' +
168169
'longs, floats, booleans, or datetime. Dictioary key\'s ' +
169170
'"{0}" value {1} of type {2} is unsupported.'.format(

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name='analytics-python',
16-
version='0.2.6',
16+
version='0.2.7',
1717
url='https://github.com/segmentio/analytics-python',
1818
author='Ilya Volodarsky',
1919
author_email='[email protected]',

0 commit comments

Comments
 (0)