有不希望在project_item和分支組合已經運行運行ssh命令SSH命令我基礎上,project_item和branch..i運行,所以我想添加一個條件來檢查project_item和分支組合是否已被解析,有關如何添加它的任何想法?添加一個條件,以檢查是否project_item和分支已經被解析
for project_item in projects:
branch = manifest_data(project_item)
print "PROJECT_ITEM: " + project_item
print "BRANCH: " + branch
/*********condition to check if the project_item/branch combo is already parsed/***********
mft = manifest_table(project_item,branch)
if 'win32' in OS_Type and branch != 'PROJECT NOT ENBALED':
#print OS_Type
cmd = "\"\"%s\Git\\bin\sh.exe\" --login -c \"ssh -l user -p 29418 review-android.company.com gerrit query project:%s branch:%s --format=JSON status:open --commit-message --current-patch-set\"\" >> gerrit_output.txt" %(os.environ['ProgramFiles(x86)'], project_item,branch)
elif 'linux' in OS_Type:
#print OS_Type
cmd = "ssh -l user -p 29418 review-android.company.com gerrit query project:%s branch:%s --format=JSON status:open --commit-message --current-patch-set\"\" >> gerrit_output.txt" %(project_item,branch)
你是什麼意思的「解析」?從你的編輯看起來你的意思是「叫」。 PS:似乎有一個錯字:「ENBALED」。 –