mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-07 13:41:12 -07:00
PEP8: Tests for membership should use in
/not in
* .has_key() is deprecated, use `in`
This commit is contained in:
parent
92ae852513
commit
1fd904eb5b
5 changed files with 37 additions and 37 deletions
|
@ -228,7 +228,7 @@ class NTMRotatingLogHandler(object):
|
|||
def log_error_and_exit(self, error_msg):
|
||||
log(error_msg, ERROR)
|
||||
|
||||
if os.environ.has_key('NZBOP_SCRIPTDIR'):
|
||||
if 'NZBOP_SCRIPTDIR' in os.environ:
|
||||
sys.exit(core.NZBGET_POSTPROCESS_ERROR)
|
||||
elif not self.console_logging:
|
||||
sys.exit(error_msg.encode(core.SYS_ENCODING, 'xmlcharrefreplace'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue