Skip to content

Commit

Permalink
Merge pull request ansible#6796 from mistaka0s/mysqldump_fix
Browse files Browse the repository at this point in the history
Remove extra quote from the mysqldump password argument
  • Loading branch information
mpdehaan committed Apr 2, 2014
2 parents 904f331 + 134c449 commit 0125f36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/database/mysql_db
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def db_delete(cursor, db):

def db_dump(module, host, user, password, db_name, target, port, socket=None):
cmd = module.get_bin_path('mysqldump', True)
cmd += " --quick --user=%s --password='%s'" % (pipes.quote(user), pipes.quote(password))
cmd += " --quick --user=%s --password=%s" % (pipes.quote(user), pipes.quote(password))
if socket is not None:
cmd += " --socket=%s" % pipes.quote(socket)
else:
Expand All @@ -141,7 +141,7 @@ def db_dump(module, host, user, password, db_name, target, port, socket=None):

def db_import(module, host, user, password, db_name, target, port, socket=None):
cmd = module.get_bin_path('mysql', True)
cmd += " --user=%s --password='%s'" % (pipes.quote(user), pipes.quote(password))
cmd += " --user=%s --password=%s" % (pipes.quote(user), pipes.quote(password))
if socket is not None:
cmd += " --socket=%s" % pipes.quote(socket)
else:
Expand Down

0 comments on commit 0125f36

Please sign in to comment.