diff options
author | W. Trevor King <wking@tremily.us> | 2012-10-28 19:59:41 -0400 |
---|---|---|
committer | W. Trevor King <wking@tremily.us> | 2012-10-28 19:59:41 -0400 |
commit | 8f1515c8130bff5de7335f648d6bbffc0a4615e5 (patch) | |
tree | bb58b8df7bd4278bc430801d29008354cc4eaeea /libbe/command/serve_commands.py | |
parent | 33f6291e1f4a04e9a56b885dea187943fcfab7a4 (diff) | |
download | bugseverywhere-8f1515c8130bff5de7335f648d6bbffc0a4615e5.tar.gz |
Use libbe.util.http.HTTP_USER_ERROR everywhere instead of hardcoding 418
Diffstat (limited to 'libbe/command/serve_commands.py')
-rw-r--r-- | libbe/command/serve_commands.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libbe/command/serve_commands.py b/libbe/command/serve_commands.py index 48d5125..30b4a69 100644 --- a/libbe/command/serve_commands.py +++ b/libbe/command/serve_commands.py @@ -77,7 +77,6 @@ class ServerApp (libbe.util.wsgi.WSGI_AppObject, self.storage = storage self.ui = libbe.command.base.UserInterface() self.notify = notify - self.http_user_error = 418 # handlers def run(self, environ, start_response): @@ -88,13 +87,13 @@ class ServerApp (libbe.util.wsgi.WSGI_AppObject, name = data['command'] except KeyError: raise libbe.util.wsgi.HandlerError( - self.http_user_error, 'UnknownCommand') + libbe.util.http.HTTP_USER_ERROR, 'UnknownCommand') parameters = data.get('parameters', {}) try: Class = libbe.command.get_command_class(command_name=name) except libbe.command.UnknownCommand, e: raise libbe.util.wsgi.HandlerError( - self.http_user_error, 'UnknownCommand {}'.format(e)) + libbe.util.http.HTTP_USER_ERROR, 'UnknownCommand {}'.format(e)) command = Class(ui=self.ui) self.ui.setup_command(command) arguments = [option.arg for option in command.options |