mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 00:32:58 -07:00
Fix mutable default arguments
This commit is contained in:
parent
a887489666
commit
d6f9a82edb
1 changed files with 4 additions and 2 deletions
|
@ -2442,7 +2442,8 @@ class PLEX(Notifier):
|
||||||
else:
|
else:
|
||||||
return request.request_content(url)
|
return request.request_content(url)
|
||||||
|
|
||||||
def _sendjson(self, host, method, params={}):
|
def _sendjson(self, host, method, params=None):
|
||||||
|
params = params or {}
|
||||||
data = [{'id': 0, 'jsonrpc': '2.0', 'method': method, 'params': params}]
|
data = [{'id': 0, 'jsonrpc': '2.0', 'method': method, 'params': params}]
|
||||||
headers = {'Content-Type': 'application/json'}
|
headers = {'Content-Type': 'application/json'}
|
||||||
url = host + '/jsonrpc'
|
url = host + '/jsonrpc'
|
||||||
|
@ -3545,7 +3546,8 @@ class XBMC(Notifier):
|
||||||
else:
|
else:
|
||||||
return request.request_content(url)
|
return request.request_content(url)
|
||||||
|
|
||||||
def _sendjson(self, host, method, params={}):
|
def _sendjson(self, host, method, params=None):
|
||||||
|
params = params or {}
|
||||||
data = [{'id': 0, 'jsonrpc': '2.0', 'method': method, 'params': params}]
|
data = [{'id': 0, 'jsonrpc': '2.0', 'method': method, 'params': params}]
|
||||||
headers = {'Content-Type': 'application/json'}
|
headers = {'Content-Type': 'application/json'}
|
||||||
url = host + '/jsonrpc'
|
url = host + '/jsonrpc'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue