Fix wo info and add tweaks to wo stack upgrade

This commit is contained in:
VirtuBox
2019-10-30 04:23:20 +01:00
parent 5cb8ab6268
commit f2d4bcb353
12 changed files with 98 additions and 69 deletions

View File

@@ -64,7 +64,7 @@ class WOVar():
# WordOps git configuration management
config = configparser.ConfigParser()
config.read(os.path.expanduser("~")+'/.gitconfig')
config.read(os.path.expanduser("~") + '/.gitconfig')
try:
wo_user = config['user']['name']
wo_email = config['user']['email']
@@ -90,7 +90,7 @@ class WOVar():
git.config("--global", "user.email", "{0}".format(wo_email))
if not os.path.isfile('/root/.gitconfig'):
copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig')
copy2(os.path.expanduser("~") + '/.gitconfig', '/root/.gitconfig')
# MySQL hostname
wo_mysql_host = ""
@@ -98,7 +98,7 @@ class WOVar():
if os.path.exists('/etc/mysql/conf.d/my.cnf'):
cnfpath = "/etc/mysql/conf.d/my.cnf"
else:
cnfpath = os.path.expanduser("~")+"/.my.cnf"
cnfpath = os.path.expanduser("~") + "/.my.cnf"
if [cnfpath] == config.read(cnfpath):
try:
wo_mysql_host = config.get('client', 'host')