Skip to content

Commit

Permalink
bug fix: wp staging
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jan 7, 2020
1 parent b595576 commit c2e37f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion plogical/applicationInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def __init__(self, installApp, extraArgs):
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:
Expand Down
6 changes: 3 additions & 3 deletions plogical/processUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ def sendCommand(command, user=None):
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 = ""
Expand All @@ -207,7 +207,7 @@ def sendCommand(command, user=None):
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:
Expand Down
4 changes: 3 additions & 1 deletion websiteFunctions/StagingSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def startCloning(self):

data = open(configPath, 'r').readlines()

logging.writeToFile(str(type(data)))

for items in data:
if items.find('DB_NAME') > -1:
try:
Expand Down Expand Up @@ -161,7 +163,7 @@ def startCloning(self):

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):
Expand Down

0 comments on commit c2e37f3

Please sign in to comment.