aws-quickstart/quickstart-examples

cleanup_response() - code quality issue and probable bug

ilyash-b opened this issue · 1 comments

for k in ["Complete", "Poll", "permission", "rule"]:
if k in response_data.keys():
del response_data[k]

for k in ["Complete", "Poll", "permission", "rule"] is meaningless because k is not used inside the for.

if k in response_data.keys(): together with del response_data[k] should delete all the keys.

Overall, the code doesn't seem to be intentional.

My mistake, ignore. Could be improved with if k in response_data I think.