summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Jones <richard@mechanicalcat.net>2012-03-15 15:04:34 -0700
committerRichard Jones <richard@mechanicalcat.net>2012-03-15 15:04:34 -0700
commit3498ef23525b993f7db9c8ecc038eecc7c5d57f9 (patch)
tree5d16be4d0b26daf83e91efc8fce63e01f7962895
parent350e6e42248114b44b95886532b335e67f78f20a (diff)
downloaddecorator-3498ef23525b993f7db9c8ecc038eecc7c5d57f9.tar.gz
fix
-rw-r--r--oauth.py8
-rw-r--r--webui.py3
2 files changed, 7 insertions, 4 deletions
diff --git a/oauth.py b/oauth.py
index 5cc0a90..1b9f9a5 100644
--- a/oauth.py
+++ b/oauth.py
@@ -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=''):
diff --git a/webui.py b/webui.py
index 7ffeaca..64f5151 100644
--- a/webui.py
+++ b/webui.py
@@ -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)