mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-22 06:13:19 -07:00
Blacken code
This commit is contained in:
parent
109e4dabcd
commit
46af216e3d
1 changed files with 8 additions and 4 deletions
|
@ -51,7 +51,10 @@ class PyMedusaApiV1(SickBeard):
|
||||||
timeout=(30, 1800),
|
timeout=(30, 1800),
|
||||||
)
|
)
|
||||||
except requests.ConnectionError:
|
except requests.ConnectionError:
|
||||||
logger.error(f'Unable to open URL: {self.url}', self.sb_init.section)
|
logger.error(
|
||||||
|
f'Unable to open URL: {self.url}',
|
||||||
|
self.sb_init.section,
|
||||||
|
)
|
||||||
return ProcessResult.failure(
|
return ProcessResult.failure(
|
||||||
f'{self.sb_init.section}: Failed to post-process - Unable to '
|
f'{self.sb_init.section}: Failed to post-process - Unable to '
|
||||||
f'connect to {self.sb_init.section}'
|
f'connect to {self.sb_init.section}'
|
||||||
|
@ -136,10 +139,11 @@ class PyMedusaApiV2(SickBeard):
|
||||||
del payload['nzbName']
|
del payload['nzbName']
|
||||||
|
|
||||||
# Update the session with the x-api-key
|
# Update the session with the x-api-key
|
||||||
self.session.headers.update({
|
headers = {
|
||||||
'x-api-key': self.sb_init.apikey,
|
'x-api-key': self.sb_init.apikey,
|
||||||
'Content-type': 'application/json'
|
'Content-type': 'application/json',
|
||||||
})
|
}
|
||||||
|
self.session.headers.update(headers)
|
||||||
|
|
||||||
# Send postprocess request
|
# Send postprocess request
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue