From 37fc3e1aaac55bc7c807609bf1c2c32810c48839 Mon Sep 17 00:00:00 2001 From: Kyle Kelley Date: Thu, 5 Sep 2013 20:45:53 -0500 Subject: [PATCH] Coerce elements to strings as fallback --- twython/helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/twython/helpers.py b/twython/helpers.py index 24ad835..a482610 100644 --- a/twython/helpers.py +++ b/twython/helpers.py @@ -25,7 +25,10 @@ def _transparent_params(_params): elif isinstance(v, basestring) or isinstance(v, numeric_types): params[k] = v elif isinstance(v, list): - params[k] = ','.join(v) + try: + params[k] = ','.join(v) + except TypeError: + params[k] = ','.join(map(str,v)) else: continue # pragma: no cover return params, files