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:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user