Several improvements

* Run `mysql_upgrade` during MySQL upgrade with `wo stack upgrade` to perform migration if needed
* WordOps now check if a repository already exist before trying to adding it again.
* install script refactored
This commit is contained in:
VirtuBox
2019-10-25 23:58:08 +02:00
parent b3cf601879
commit 7765b2ce84
13 changed files with 146 additions and 89 deletions

View File

@@ -280,17 +280,19 @@ class WOFileUtils():
"""
Searches for string in file and returns True or False.
"""
try:
Log.debug(self, "Finding string {0} to file {1}"
.format(sstr, fnm))
if os.path.isfile(fnm):
try:
Log.debug(self, "Finding string {0} to file {1}"
.format(sstr, fnm))
for line in open(fnm, encoding='utf-8'):
if sstr in line:
return True
return False
except OSError as e:
Log.debug(self, "{0}".format(e.strerror))
Log.error(self, "Unable to Search string {0} in {1}"
.format(sstr, fnm))
Log.debug(self, "{0}".format(e.strerror))
Log.error(self, "Unable to Search string {0} in {1}"
.format(sstr, fnm))
return False
def rm(self, path):
"""