mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 16:52:58 -07:00
Return error result for terminate_session
This commit is contained in:
parent
0868fa749d
commit
af8a5342fb
2 changed files with 7 additions and 9 deletions
|
@ -364,10 +364,10 @@ class WebInterface(object):
|
|||
pms_connect = pmsconnect.PmsConnect()
|
||||
result = pms_connect.terminate_session(session_key=session_key, session_id=session_id, message=message)
|
||||
|
||||
if result is True:
|
||||
return {'result': 'success', 'message': 'Session terminated.'}
|
||||
elif result:
|
||||
if isinstance(result, str):
|
||||
return {'result': 'error', 'message': 'Failed to terminate session: {}.'.format(result)}
|
||||
elif result is True:
|
||||
return {'result': 'success', 'message': 'Session terminated.'}
|
||||
else:
|
||||
return {'result': 'error', 'message': 'Failed to terminate session.'}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue