Skip to content

Commit

Permalink
error: fix error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
koehlma committed Jan 22, 2016
1 parent f0463c7 commit 81b0ff9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions uv/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,13 +645,13 @@ def __new__(cls, code=None, message=''):
if cls is UVError:
try:
# replace generic uv error with a specialized one if possible
exception = StatusCodes(code).exception
if exception is not UVError:
return exception(code, message)
code = StatusCodes(code)
if code.exception is not UVError:
return code.exception(code, message or code.message)
except ValueError:
pass
return super(UVError, cls).__new__(cls, code, message)

def __init__(self, code=None, message=''):
"""
:param code:
Expand Down

0 comments on commit 81b0ff9

Please sign in to comment.