diff options
author | Richard Jones <richard@mechanicalcat.net> | 2012-03-15 15:04:34 -0700 |
---|---|---|
committer | Richard Jones <richard@mechanicalcat.net> | 2012-03-15 15:04:34 -0700 |
commit | 3498ef23525b993f7db9c8ecc038eecc7c5d57f9 (patch) | |
tree | 5d16be4d0b26daf83e91efc8fce63e01f7962895 | |
parent | 350e6e42248114b44b95886532b335e67f78f20a (diff) | |
download | decorator-3498ef23525b993f7db9c8ecc038eecc7c5d57f9.tar.gz |
fix
-rw-r--r-- | oauth.py | 8 | ||||
-rw-r--r-- | webui.py | 3 |
2 files changed, 7 insertions, 4 deletions
@@ -38,10 +38,12 @@ SIGNATURE_METHOD = 'PLAINTEXT' class OAuthError(RuntimeError): """Generic exception class.""" - def __init__(self, message='OAuth error occured.'): - self.message = message def __str__(self): - return '%s(%s)' % (self.__class__.__name__, self.message) + if not self.args: + message = '' + else: + message = self.args[0] + return '%s(%s)' % (self.__class__.__name__, message) def build_authenticate_header(realm=''): @@ -3225,5 +3225,6 @@ class WebUI: disallowed. ''' consumer, token, params, user = self._parse_request() - return 'Access allowed for %s (ps. I got params=%r)'%(user, params) + message = 'Access allowed for %s (ps. I got params=%r)'%(user, params) + self.write_plain(message) |