pep8 fixes

reviewable/pr18780/r1
Michael DeHaan 12 years ago
parent 958b2909f8
commit 8d3f73d562

@ -157,12 +157,14 @@ def absent(module, dest, regexp, backup):
f.close() f.close()
cre = re.compile(regexp) cre = re.compile(regexp)
found = [] found = []
def matcher(line): def matcher(line):
if cre.search(line): if cre.search(line):
found.append(line) found.append(line)
return False return False
else: else:
return True return True
lines = filter(matcher, lines) lines = filter(matcher, lines)
changed = len(found) > 0 changed = len(found) > 0
if changed: 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) query = "GRANT %s ON %s TO '%s'@'%s'" % (priv_string,db_table,user,host)
if 'GRANT' in priv: if 'GRANT' in priv:
query = query + " WITH GRANT OPTION" query = query + " WITH GRANT OPTION"
cursor.execute(query) cursor.execute(query)
def load_mycnf(): def load_mycnf():

Loading…
Cancel
Save