Fix wo update

This commit is contained in:
VirtuBox
2019-06-17 11:56:33 +02:00
parent 8140394b5a
commit dbffa22412

View File

@@ -30,10 +30,23 @@ class WOUpdateController(CementBaseController):
@expose(hide=True) @expose(hide=True)
def default(self): def default(self):
filename = "woupdate" + time.strftime("%Y%m%d-%H%M%S") filename = "woupdate" + time.strftime("%Y%m%d-%H%M%S")
if self.app.pargs.travis:
WODownload.download(self, [["https://raw.githubusercontent.com/" WODownload.download(self, [["https://raw.githubusercontent.com/"
"WordOps/WordOps/updating-configuration/install", "WordOps/WordOps/updating-configuration/install",
"/tmp/{0}".format(filename), "/tmp/{0}".format(filename),
"update script"]]) "update script"]])
try:
Log.info(self, "updating WordOps, please wait...")
os.system("bash /tmp/{0} --travis --force".format(filename))
except OSError as e:
Log.debug(self, str(e))
Log.error(self, "WordOps update failed !")
else:
WODownload.download(self, [["https://raw.githubusercontent.com/"
"WordOps/WordOps/master/install",
"/tmp/{0}".format(filename),
"update script"]])
if self.app.pargs.force: if self.app.pargs.force:
try: try:
Log.info(self, "updating WordOps, please wait...") Log.info(self, "updating WordOps, please wait...")
@@ -48,10 +61,6 @@ class WOUpdateController(CementBaseController):
except OSError as e: except OSError as e:
Log.debug(self, str(e)) Log.debug(self, str(e))
Log.error(self, "WordOps update failed !") Log.error(self, "WordOps update failed !")
if self.app.pargs.travis:
try:
Log.info(self, "updating WordOps, please wait...")
os.system("bash /tmp/{0} --travis --force".format(filename))
def load(app): def load(app):