bug fix in auto git commit

This commit is contained in:
Usman Nasir
2020-03-19 11:39:10 +05:00
parent 0b9646302d
commit ac7436e293
4 changed files with 22 additions and 7 deletions

View File

@@ -3393,12 +3393,12 @@ StrictHostKeyChecking no
command = 'git -C %s push --set-upstream origin %s' % (self.folder, currentBranch)
commandStatus = ProcessUtilities.outputExecutioner(command)
if commandStatus.find('Everything up-to-date') == -1 and commandStatus.find('rejected') == -1:
if commandStatus.find('Everything up-to-date') == -1 and commandStatus.find('rejected') == -1 and commandStatus.find('Permission denied') == -1:
data_ret = {'status': 1, 'commandStatus': commandStatus}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
else:
data_ret = {'status': 0, 'error_message': 'Push not required.', 'commandStatus': commandStatus}
data_ret = {'status': 0, 'error_message': 'Push failed.', 'commandStatus': commandStatus}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)