mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
Fix "import *" and resultant new things detectable from "make pyflakes"
This commit is contained in:
parent
33aa50eae7
commit
c861e0de55
4 changed files with 26 additions and 21 deletions
|
@ -20,7 +20,7 @@
|
|||
import sys
|
||||
import os
|
||||
import shlex
|
||||
from ansible.errors import *
|
||||
from ansible import errors
|
||||
|
||||
try:
|
||||
import json
|
||||
|
@ -196,7 +196,7 @@ def parse_json(data):
|
|||
tokens = shlex.split(data)
|
||||
for t in tokens:
|
||||
if t.find("=") == -1:
|
||||
raise AnsibleError("failed to parse: %s" % data)
|
||||
raise errors.AnsibleError("failed to parse: %s" % data)
|
||||
(key,value) = t.split("=", 1)
|
||||
if key == 'changed' or 'failed':
|
||||
if value.lower() in [ 'true', '1' ]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue