Catch exception when retrieving current activity
This commit is contained in:
@@ -3738,6 +3738,7 @@ class WebInterface(object):
|
||||
}
|
||||
```
|
||||
"""
|
||||
try:
|
||||
pms_connect = pmsconnect.PmsConnect(token=plexpy.CONFIG.PMS_TOKEN)
|
||||
result = pms_connect.get_current_activity()
|
||||
|
||||
@@ -3751,6 +3752,8 @@ class WebInterface(object):
|
||||
return result
|
||||
else:
|
||||
logger.warn(u"Unable to retrieve data for get_activity.")
|
||||
except Exception as e:
|
||||
logger.exception(u"Unable to retrieve data for get_activity: %s" % e)
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.tools.json_out()
|
||||
|
Reference in New Issue
Block a user