Some more lowercase for readability
This commit is contained in:
parent
47919b0ca8
commit
24c70a5ac8
1 changed files with 2 additions and 2 deletions
4
mpv.py
4
mpv.py
|
|
@ -52,14 +52,14 @@ class ErrorCode(object):
|
|||
}
|
||||
|
||||
@staticmethod
|
||||
def DEFAULT_ERROR_HANDLER(ec, *args):
|
||||
def default_error_handler(ec, *args):
|
||||
return ValueError(_mpv_error_string(ec).decode(), ec, *args)
|
||||
|
||||
@classmethod
|
||||
def raise_for_ec(kls, func, *args):
|
||||
ec = func(*args)
|
||||
ec = 0 if ec > 0 else ec
|
||||
ex = kls.EXCEPTION_DICT.get(ec , kls.DEFAULT_ERROR_HANDLER)
|
||||
ex = kls.EXCEPTION_DICT.get(ec , kls.default_error_handler)
|
||||
if ex:
|
||||
raise ex(ec, *args)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue