试图在语句中使用输入变量。
def email(account):
email = fabric.operations.prompt("Enter client's email address:")
run('mysql -u %s -p%s -e "UPDATE users SET email = %email WHERE id = 1" %s' % (env.user, dbpasswd, account))
错误:
File "/tmp/fabfile.py", line 196, in email
run('mysql -u %s -p%s -e "UPDATE users SET email = %email WHERE id = 1" %s' % (env.user, dbpasswd, account))
TypeError: float argument required, not str
任何想法!