pep8 fixes

pull/1648/head
Michael DeHaan 12 years ago
parent 27e518a0b1
commit c0747b7baa

@ -142,10 +142,13 @@ def is_failed(result):
return ((result.get('rc', 0) != 0) or (result.get('failed', False) in [ True, 'True', 'true']))
def check_conditional(conditional):
def is_set(var):
return not var.startswith("$")
def is_unset(var):
return var.startswith("$")
return eval(conditional.replace("\n", "\\n"))
def is_executable(path):

@ -157,12 +157,14 @@ def absent(module, dest, regexp, backup):
f.close()
cre = re.compile(regexp)
found = []
def matcher(line):
if cre.search(line):
found.append(line)
return False
else:
return True
lines = filter(matcher, lines)
changed = len(found) > 0
if changed:

@ -214,7 +214,6 @@ def privileges_grant(cursor, user,host,db_table,priv):
query = "GRANT %s ON %s TO '%s'@'%s'" % (priv_string,db_table,user,host)
if 'GRANT' in priv:
query = query + " WITH GRANT OPTION"
cursor.execute(query)
def load_mycnf():

Loading…
Cancel
Save