From c2e37f30bc9e7599d5a3c425baeb51da51006f2d Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 7 Jan 2020 12:41:32 +0500 Subject: [PATCH] bug fix: wp staging --- plogical/applicationInstaller.py | 3 ++- plogical/processUtilities.py | 6 +++--- websiteFunctions/StagingSetup.py | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/plogical/applicationInstaller.py b/plogical/applicationInstaller.py index 79ec37dd8..690367336 100755 --- a/plogical/applicationInstaller.py +++ b/plogical/applicationInstaller.py @@ -27,7 +27,8 @@ class ApplicationInstaller(multi.Thread): multi.Thread.__init__(self) self.installApp = installApp self.extraArgs = extraArgs - self.tempStatusPath = self.extraArgs['tempStatusPath'] + if extraArgs != None: + self.tempStatusPath = self.extraArgs['tempStatusPath'] def run(self): try: diff --git a/plogical/processUtilities.py b/plogical/processUtilities.py index e0517ce96..8ae5691ed 100755 --- a/plogical/processUtilities.py +++ b/plogical/processUtilities.py @@ -187,12 +187,12 @@ class ProcessUtilities(multi.Thread): sock = ret[0] if user == None: - logging.writeToFile(ProcessUtilities.token + command) + #logging.writeToFile(ProcessUtilities.token + command) sock.sendall((ProcessUtilities.token + command).encode('utf-8')) else: command = '%s-u %s %s' % (ProcessUtilities.token, user, command) command = command.replace('sudo', '') - logging.writeToFile(ProcessUtilities.token + command) + #logging.writeToFile(ProcessUtilities.token + command) sock.sendall(command.encode('utf-8')) data = "" @@ -207,7 +207,7 @@ class ProcessUtilities(multi.Thread): logging.writeToFile('Some data could not be decoded to str, error message: %s' % str(msg)) sock.close() - logging.writeToFile('Final data: %s.' % (str(data))) + #logging.writeToFile('Final data: %s.' % (str(data))) return data except BaseException as msg: diff --git a/websiteFunctions/StagingSetup.py b/websiteFunctions/StagingSetup.py index c4b31aa3b..aadae1a0d 100644 --- a/websiteFunctions/StagingSetup.py +++ b/websiteFunctions/StagingSetup.py @@ -88,6 +88,8 @@ class StagingSetup(multi.Thread): data = open(configPath, 'r').readlines() + logging.writeToFile(str(type(data))) + for items in data: if items.find('DB_NAME') > -1: try: @@ -161,7 +163,7 @@ class StagingSetup(multi.Thread): return 0 except BaseException as msg: - mesg = '%s. [404]' % (str(msg)) + mesg = '%s. [168][404]' % (str(msg)) logging.statusWriter(self.tempStatusPath, mesg) def startSyncing(self):