]> projects.mako.cc - twitter-api-cdsw/blob - tweepy/error.py
1c47a5a2c3724fb74c6a56157c990c41856f9b53
[twitter-api-cdsw] / tweepy / error.py
1 # Tweepy
2 # Copyright 2009-2010 Joshua Roesslein
3 # See LICENSE for details.
4
5 from __future__ import print_function
6
7 import six
8
9
10 class TweepError(Exception):
11     """Tweepy exception"""
12
13     def __init__(self, reason, response=None):
14         self.reason = six.text_type(reason)
15         self.response = response
16         Exception.__init__(self, reason)
17
18     def __str__(self):
19         return self.reason

Benjamin Mako Hill || Want to submit a patch?