Merge branch 'v2.0.2' into stable

This commit is contained in:
Usman Nasir
2020-07-24 22:59:30 +05:00
4 changed files with 15 additions and 1 deletions

View File

@@ -279,6 +279,10 @@ class emailMarketing(multi.Thread):
else:
self.verifyHost = SMTPHosts.objects.get(host=self.extraArgs['host'])
self.smtpServer = smtplib.SMTP(str(self.verifyHost.host), int(self.verifyHost.port))
if int(self.verifyHost.port) == 587:
self.smtpServer.starttls()
self.smtpServer.login(str(self.verifyHost.userName), str(self.verifyHost.password))
return 1
except smtplib.SMTPHeloError:

View File

@@ -517,6 +517,10 @@ class EmailMarketingManager:
try:
verifyLogin = smtplib.SMTP(str(smtpHost), int(smtpPort))
if int(smtpPort) == 587:
verifyLogin.starttls()
verifyLogin.login(str(smtpUserName), str(smtpPassword))
admin = Administrator.objects.get(pk=userID)
@@ -618,6 +622,10 @@ class EmailMarketingManager:
try:
verifyHost = SMTPHosts.objects.get(id=id)
verifyLogin = smtplib.SMTP(str(verifyHost.host), int(verifyHost.port))
if int(verifyHost.port) == 587:
verifyLogin.starttls()
verifyLogin.login(str(verifyHost.userName), str(verifyHost.password))
data_ret = {"status": 1, 'message': 'Login successful.'}

View File

@@ -258,6 +258,8 @@ class FileManager:
self.changeOwner(self.data['newPath'])
self.fixPermissions(domainName)
json_data = json.dumps(finalData)
return HttpResponse(json_data)

View File

@@ -1439,7 +1439,7 @@ class Upgrade:
command = 'git status'
currentBranch = subprocess.check_output(shlex.split(command)).decode()
if currentBranch.find('On branch %s' % (branch)) > -1:
if currentBranch.find('On branch %s' % (branch)) > -1 and currentBranch.find('On branch %s-dev' % (branch)) == -1:
command = 'git stash'
Upgrade.executioner(command, command, 1)