From: Andrew Grimberg Date: Tue, 2 Jul 2019 22:23:01 +0000 (-0700) Subject: Fix retyping issue of function X-Git-Tag: v0.25.3~5 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F58%2F16058%2F5;p=releng%2Flftools.git Fix retyping issue of function There was a subtle bug where a function call was being overwritten by a local variable of the same name and then a call to the function was being attempted. Change-Id: I7316df0c773db347ccb1e7eb79e2f40fee3a9db2 Signed-off-by: Andrew Grimberg --- diff --git a/lftools/lfidapi.py b/lftools/lfidapi.py index 3033c135..05a6a825 100755 --- a/lftools/lfidapi.py +++ b/lftools/lfidapi.py @@ -87,8 +87,8 @@ def helper_invite(email, group): def helper_create_group(group): """Create group.""" - check_response_code = helper_check_group_exists(group) - if check_response_code == 200: + response_code = helper_check_group_exists(group) + if response_code == 200: print("Group {} already exists exiting...".format(group)) else: access_token, url = oauth_helper() diff --git a/releasenotes/notes/lfidapi-type-error-fix-aff74c5a7ea11a34.yaml b/releasenotes/notes/lfidapi-type-error-fix-aff74c5a7ea11a34.yaml new file mode 100644 index 00000000..423f15a4 --- /dev/null +++ b/releasenotes/notes/lfidapi-type-error-fix-aff74c5a7ea11a34.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + There was a subtle bug where a function call was being overwritten by a + local variable of the same name and then a call to the function was + being attempted.