From 20b3ba3f4e6ef82107e321dbb15a9277d5b06f11 2018-01-22 16:28:55 From: Lance Edgar Date: 2018-01-22 16:28:55 Subject: [PATCH] Accept 'user' kwarg when cloning MySQL database via fabric --- diff --git a/rattail/fablib/mysql.py b/rattail/fablib/mysql.py index 23dabacf98cfb45b5afa68537d723fd3a413bc57..90102381fcd729b68befff3273bf66a32300f015 100644 --- a/rattail/fablib/mysql.py +++ b/rattail/fablib/mysql.py @@ -178,7 +178,7 @@ def restore_db(name, source=None, user=None): sudo('rm {}.sql'.format(name)) -def clone_db(name, download, force=False): +def clone_db(name, download, user='rattail', force=False): """ Clone a MySQL database from a (presumably live) server @@ -196,7 +196,7 @@ def clone_db(name, download, force=False): create_db(name, checkfirst=False) # obtain database dump from live server - download() + download('{}.sql.gz'.format(name), user=user) # upload database dump to target server put('{}.sql.gz'.format(name))