Fix incompatible types in assignment

This commit is contained in:
Labrys of Knossos 2022-12-14 03:17:00 -05:00
commit baef434332
2 changed files with 2 additions and 4 deletions

View file

@ -158,12 +158,11 @@ def process(
else: else:
logger.debug(f'path: {dir_name}', section) logger.debug(f'path: {dir_name}', section)
data = {'name': 'Rename', 'path': dir_name} data = {'name': 'Rename', 'path': dir_name}
data = json.dumps(data)
try: try:
logger.debug(f'Opening URL: {url} with data: {data}', section) logger.debug(f'Opening URL: {url} with data: {data}', section)
r = requests.post( r = requests.post(
url, url,
data=data, data=json.dumps(data),
headers=headers, headers=headers,
stream=True, stream=True,
verify=False, verify=False,

View file

@ -429,7 +429,6 @@ def process(
} }
if not download_id: if not download_id:
data.pop('downloadClientId') data.pop('downloadClientId')
data = json.dumps(data)
url = core.utils.common.create_url(scheme, host, port, route) url = core.utils.common.create_url(scheme, host, port, route)
try: try:
if section == 'SickBeard': if section == 'SickBeard':
@ -509,7 +508,7 @@ def process(
logger.debug(f'Opening URL: {url} with data: {data}', section) logger.debug(f'Opening URL: {url} with data: {data}', section)
r = requests.post( r = requests.post(
url, url,
data=data, data=json.dumps(data),
headers=headers, headers=headers,
stream=True, stream=True,
verify=False, verify=False,