Default RedditError status code to 400.

When threading validator errors through to reddit_http_error, it is
useful to be able to assume that status code is a valid number in all
cases.
This commit is contained in:
Max Goodman
2013-03-09 00:44:52 -08:00
parent 6f26ba0ef5
commit c3e804ff13

View File

@@ -141,7 +141,7 @@ def add_error_codes(new_codes):
class RedditError(Exception):
name = None
fields = None
code = None
code = 400
def __init__(self, name=None, msg_params=None, fields=None, code=None):
Exception.__init__(self)