mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
PEP8: .has_key() is deprecated, use 'in'
This commit is contained in:
parent
948ead5408
commit
c5c5279a8b
2 changed files with 4 additions and 4 deletions
|
@ -189,7 +189,7 @@ class autoProcessMovie(object):
|
||||||
status = 0
|
status = 0
|
||||||
elif num_files > 0 and good_files < num_files:
|
elif num_files > 0 and good_files < num_files:
|
||||||
logger.info("Status shown as success from Downloader, but corrupt video files found. Setting as failed.", section)
|
logger.info("Status shown as success from Downloader, but corrupt video files found. Setting as failed.", section)
|
||||||
if os.environ.has_key('NZBOP_VERSION') and os.environ['NZBOP_VERSION'][0:5] >= '14.0':
|
if 'NZBOP_VERSION' in os.environ and os.environ['NZBOP_VERSION'][0:5] >= '14.0':
|
||||||
print('[NZB] MARK=BAD')
|
print('[NZB] MARK=BAD')
|
||||||
if failureLink:
|
if failureLink:
|
||||||
failureLink = failureLink + '&corrupt=true'
|
failureLink = failureLink + '&corrupt=true'
|
||||||
|
@ -200,7 +200,7 @@ class autoProcessMovie(object):
|
||||||
else:
|
else:
|
||||||
logger.warning("No media files found in directory %s. Processing this as a failed download" % (dirName), section)
|
logger.warning("No media files found in directory %s. Processing this as a failed download" % (dirName), section)
|
||||||
status = 1
|
status = 1
|
||||||
if os.environ.has_key('NZBOP_VERSION') and os.environ['NZBOP_VERSION'][0:5] >= '14.0':
|
if 'NZBOP_VERSION' in os.environ and os.environ['NZBOP_VERSION'][0:5] >= '14.0':
|
||||||
print('[NZB] MARK=BAD')
|
print('[NZB] MARK=BAD')
|
||||||
|
|
||||||
if status == 0:
|
if status == 0:
|
||||||
|
|
|
@ -169,7 +169,7 @@ class autoProcessTV(object):
|
||||||
logger.info('Found corrupt videos. Setting status Failed')
|
logger.info('Found corrupt videos. Setting status Failed')
|
||||||
status = 1
|
status = 1
|
||||||
failed = 1
|
failed = 1
|
||||||
if os.environ.has_key('NZBOP_VERSION') and os.environ['NZBOP_VERSION'][0:5] >= '14.0':
|
if 'NZBOP_VERSION' in os.environ and os.environ['NZBOP_VERSION'][0:5] >= '14.0':
|
||||||
print('[NZB] MARK=BAD')
|
print('[NZB] MARK=BAD')
|
||||||
if failureLink:
|
if failureLink:
|
||||||
failureLink = failureLink + '&corrupt=true'
|
failureLink = failureLink + '&corrupt=true'
|
||||||
|
@ -190,7 +190,7 @@ class autoProcessTV(object):
|
||||||
logger.warning("No media files found in directory %s. Processing this as a failed download" % (dirName), section)
|
logger.warning("No media files found in directory %s. Processing this as a failed download" % (dirName), section)
|
||||||
status = 1
|
status = 1
|
||||||
failed = 1
|
failed = 1
|
||||||
if os.environ.has_key('NZBOP_VERSION') and os.environ['NZBOP_VERSION'][0:5] >= '14.0':
|
if 'NZBOP_VERSION' in os.environ and os.environ['NZBOP_VERSION'][0:5] >= '14.0':
|
||||||
print('[NZB] MARK=BAD')
|
print('[NZB] MARK=BAD')
|
||||||
|
|
||||||
if status == 0 and core.TRANSCODE == 1: # only transcode successful downloads
|
if status == 0 and core.TRANSCODE == 1: # only transcode successful downloads
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue