mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -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:
|
||||
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}]
|
||||
headers = {'Content-Type': 'application/json'}
|
||||
url = host + '/jsonrpc'
|
||||
|
@ -3545,7 +3546,8 @@ class XBMC(Notifier):
|
|||
else:
|
||||
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}]
|
||||
headers = {'Content-Type': 'application/json'}
|
||||
url = host + '/jsonrpc'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue