Fix MySQL purge with remote MySQL server

This commit is contained in:
VirtuBox
2020-01-21 12:44:07 +01:00
parent 87e46d9145
commit a40a96c3e3
3 changed files with 13 additions and 13 deletions

View File

@@ -31,9 +31,8 @@ class WOMysql():
# Makes connection with MySQL server
try:
if os.path.exists('/etc/mysql/conf.d/my.cnf'):
connection = \
pymysql.connect(read_default_file='/etc/mysql/'
'conf.d/my.cnf')
connection = pymysql.connect(
read_default_file='/etc/mysql/conf.d/my.cnf')
else:
connection = pymysql.connect(read_default_file='~/.my.cnf')
return connection