我想在if条件中引用两个变量
def remedialIssue(self, branch, issue_id, new_status):
AppBranch = request.get("/rest/api/latest/issue/" + str(issue_id), params=querystring, contentType='application/json')
appbranch = json.loads(AppBranch.response)
appbranch = u" {0}".format(appbranch['fields']['customfield_1000'])
appbranch = str(appbranch)
branch = str(branch)
print(appbranch)
print(branch)
if appbranch == branch:
print "error"
从外部应用程序GUI传递分支,该应用程序GUI调用此函数,但是即使满足条件,它也不会给出任何输出或错误,只需完成程序即可。
答案 0 :(得分:0)
您的条件测试表明appbranch
和branch
相等。由于您要在appbranch
前面放置一个空格,因此这似乎不太可能:
u" {0}".format(...)
除非branch
也以空格开头?