Fix "import *" and resultant new things detectable from "make pyflakes"

This commit is contained in:
Michael DeHaan 2012-03-18 17:16:12 -04:00
parent 33aa50eae7
commit c861e0de55
4 changed files with 26 additions and 21 deletions

View file

@ -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' ]: