PEP8: Tests for membership should use in/not in

* .has_key() is deprecated, use `in`
This commit is contained in:
Labrys 2016-06-04 22:20:45 -04:00
parent 92ae852513
commit 1fd904eb5b
5 changed files with 37 additions and 37 deletions

View file

@ -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'))