{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1511","repository_url":"https://api.github.com/repos/ansible/ansible-modules-extras","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1511/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1511/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1511/events","html_url":"https://github.com/ansible/ansible-modules-extras/pull/1511","id":127159017,"number":1511,"title":"fix NoneType error with ec2_vpc_route_table reruns","user":{"login":"Etherdaemon","id":8214068,"avatar_url":"https://avatars.githubusercontent.com/u/8214068?v=3","gravatar_id":"","url":"https://api.github.com/users/Etherdaemon","html_url":"https://github.com/Etherdaemon","followers_url":"https://api.github.com/users/Etherdaemon/followers","following_url":"https://api.github.com/users/Etherdaemon/following{/other_user}","gists_url":"https://api.github.com/users/Etherdaemon/gists{/gist_id}","starred_url":"https://api.github.com/users/Etherdaemon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Etherdaemon/subscriptions","organizations_url":"https://api.github.com/users/Etherdaemon/orgs","repos_url":"https://api.github.com/users/Etherdaemon/repos","events_url":"https://api.github.com/users/Etherdaemon/events{/privacy}","received_events_url":"https://api.github.com/users/Etherdaemon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/cloud","name":"cloud","color":"c7def8"},{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/needs_revision","name":"needs_revision","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":37,"created_at":"2016-01-18T05:58:15Z","updated_at":"2016-07-08T04:28:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1511","html_url":"https://github.com/ansible/ansible-modules-extras/pull/1511","diff_url":"https://github.com/ansible/ansible-modules-extras/pull/1511.diff","patch_url":"https://github.com/ansible/ansible-modules-extras/pull/1511.patch"},"body":"Proposed fix for #1510. \r\n\r\nFound that in the function ensure_routes that was assuming that propagating_vgw_ids was not null and therefore throwing a NoneType not iterable error when being called inside the for r in routes_to_match list comprehension.\r\n\r\nI've pulled it out inside a for loop and some nested if statements for readability and checking with an or statement whether propagating_vgw_ids is not nil or r.gateway_id is in propagating_vgw_ids if not nil.\r\n\r\nI've also updated the if changed: block to update changed to True explicitly as when passing in routes_to_delete it hits a type error when it exits the module due to the boto.vpc.routetable.Route type being passed into the result from routes_to_delete.\r\n\r\n@naslanidis would you be able to test this fix for me please? I tested it with adding and removing routes using local and igw routes but I dont have a propagating vpn gateway available in my personal account that I can test this with."},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/comments/231272271","html_url":"https://github.com/ansible/ansible-modules-extras/pull/1511#issuecomment-231272271","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1511","id":231272271,"user":{"login":"gregdek","id":252125,"avatar_url":"https://avatars.githubusercontent.com/u/252125?v=3","gravatar_id":"","url":"https://api.github.com/users/gregdek","html_url":"https://github.com/gregdek","followers_url":"https://api.github.com/users/gregdek/followers","following_url":"https://api.github.com/users/gregdek/following{/other_user}","gists_url":"https://api.github.com/users/gregdek/gists{/gist_id}","starred_url":"https://api.github.com/users/gregdek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregdek/subscriptions","organizations_url":"https://api.github.com/users/gregdek/orgs","repos_url":"https://api.github.com/users/gregdek/repos","events_url":"https://api.github.com/users/gregdek/events{/privacy}","received_events_url":"https://api.github.com/users/gregdek/received_events","type":"User","site_admin":false},"created_at":"2016-07-08T04:28:14Z","updated_at":"2016-07-08T04:28:14Z","body":"Thanks @Etherdaemon for this PR. Unfortunately, it is not mergeable in its current state due to merge conflicts. Please rebase your PR. When you are done, please comment with text 'ready_for_review' and we will put this PR back into review.\n\nFor help on how to do this cleanly please see http://docs.ansible.com/ansible/community.html#contributing-code-features-or-bugfixes\n\n[This message brought to you by your friendly Ansibull-bot.]"}}
{"actor":{"display_login":"gregdek"}}