diff options
author | Ib Lundgren <ib.lundgren@gmail.com> | 2014-09-24 15:30:46 +0100 |
---|---|---|
committer | Ib Lundgren <ib.lundgren@gmail.com> | 2014-09-24 15:30:46 +0100 |
commit | 39013947bd2e242dda85fb0f150c49be23fd7510 (patch) | |
tree | 6db8bf4baa0cc648ac3323d019393bbeca256322 /oauthlib/common.py | |
parent | edab385f951e38d65a25003f193793b63037bdec (diff) | |
download | oauthlib-39013947bd2e242dda85fb0f150c49be23fd7510.tar.gz |
Fix error message init and add request details.
Errors were not initialised and thus no message would be
included. Changed to now include the error label, description
and request details.
Diffstat (limited to 'oauthlib/common.py')
-rw-r--r-- | oauthlib/common.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/oauthlib/common.py b/oauthlib/common.py index 9e8c175..d3e2edb 100644 --- a/oauthlib/common.py +++ b/oauthlib/common.py @@ -393,6 +393,11 @@ class Request(object): def __getattr__(self, name): return self._params.get(name, None) + + def __repr__(self): + return '<oauthlib.Request url="%s", http_method="%s", headers="%s", body="%s">' % ( + self.uri, self.http_method, self.headers, self.body) + @property def uri_query(self): return urlparse.urlparse(self.uri).query |