mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
Fix incorrect use of is
for comparisons.
See https://bugs.python.org/issue34850 for details.
This commit is contained in:
parent
cd7a144515
commit
0a461380a3
21 changed files with 42 additions and 42 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue