Updated packages and code to python3. Won't work with python 2
[twitter-api-cdsw-solutions] / tweepy / error.py
index 753e2fe..1c47a5a 100644 (file)
@@ -2,14 +2,18 @@
 # Copyright 2009-2010 Joshua Roesslein
 # See LICENSE for details.
 
+from __future__ import print_function
+
+import six
+
+
 class TweepError(Exception):
     """Tweepy exception"""
 
     def __init__(self, reason, response=None):
-        self.reason = unicode(reason)
+        self.reason = six.text_type(reason)
         self.response = response
         Exception.__init__(self, reason)
 
     def __str__(self):
         return self.reason
-

Benjamin Mako Hill || Want to submit a patch?