Fix incorrect use of is for comparisons.

See https://bugs.python.org/issue34850 for details.
This commit is contained in:
Matt Clay 2019-02-12 15:15:23 -08:00
commit 0a461380a3
21 changed files with 42 additions and 42 deletions

View file

@ -79,7 +79,7 @@ def sensu_subscription(module, path, name, state='present', backup=False):
try:
config = json.load(open(path))
except IOError as e:
if e.errno is 2: # File not found, non-fatal
if e.errno == 2: # File not found, non-fatal
if state == 'absent':
reasons.append('file did not exist and state is `absent\'')
return changed, reasons