mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 01:36:11 +00:00
re thorw exception in wrapper
This commit is contained in:
parent
590c3ef4c3
commit
066ec81e16
3 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.emby"
|
||||
name="Emby"
|
||||
version="2.3.2"
|
||||
version="2.3.3"
|
||||
provider-name="Emby.media">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.19.0"/>
|
||||
|
|
|
@ -22,7 +22,7 @@ ga = GoogleAnalytics()
|
|||
|
||||
##################################################################################################
|
||||
|
||||
def catch_except(errors=(Exception, ), default_value=False):
|
||||
def catch_except(errors=(Exception, )):
|
||||
# Will wrap method with try/except and print parameters for easier debugging
|
||||
def decorator(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
|
@ -34,7 +34,7 @@ def catch_except(errors=(Exception, ), default_value=False):
|
|||
log.exception(error)
|
||||
log.error("function: %s \n args: %s \n kwargs: %s",
|
||||
func.__name__, args, kwargs)
|
||||
return default_value
|
||||
raise
|
||||
|
||||
return wrapper
|
||||
return decorator
|
||||
|
|
|
@ -307,7 +307,7 @@ def indent(elem, level=0):
|
|||
if level and (not elem.tail or not elem.tail.strip()):
|
||||
elem.tail = i
|
||||
|
||||
def catch_except(errors=(Exception, ), default_value=False):
|
||||
def catch_except(errors=(Exception, )):
|
||||
# Will wrap method with try/except and print parameters for easier debugging
|
||||
def decorator(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
|
@ -317,7 +317,7 @@ def catch_except(errors=(Exception, ), default_value=False):
|
|||
log.exception(error)
|
||||
log.error("function: %s \n args: %s \n kwargs: %s",
|
||||
func.__name__, args, kwargs)
|
||||
return default_value
|
||||
raise
|
||||
|
||||
return wrapper
|
||||
return decorator
|
||||
|
|
Loading…
Reference in a new issue