{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/22114","labels_url":"https://api.github.com/repos/saltstack/salt/issues/22114/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/22114/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/22114/events","html_url":"https://github.com/saltstack/salt/pull/22114","id":64898141,"number":22114,"title":"Fixing KeyError when there are no additional pages","user":{"login":"dmyerscough","id":1395617,"avatar_url":"https://avatars.githubusercontent.com/u/1395617?v=3","gravatar_id":"","url":"https://api.github.com/users/dmyerscough","html_url":"https://github.com/dmyerscough","followers_url":"https://api.github.com/users/dmyerscough/followers","following_url":"https://api.github.com/users/dmyerscough/following{/other_user}","gists_url":"https://api.github.com/users/dmyerscough/gists{/gist_id}","starred_url":"https://api.github.com/users/dmyerscough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmyerscough/subscriptions","organizations_url":"https://api.github.com/users/dmyerscough/orgs","repos_url":"https://api.github.com/users/dmyerscough/repos","events_url":"https://api.github.com/users/dmyerscough/events{/privacy}","received_events_url":"https://api.github.com/users/dmyerscough/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bugfix%20-%20back-port","name":"Bugfix - back-port","color":"d4c5f9"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Minor%20Change","name":"Minor Change","color":"bfe5bf"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Tests%20Passed","name":"Tests Passed","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-28T04:45:54Z","updated_at":"2015-05-20T01:29:52Z","closed_at":"2015-03-30T21:36:02Z","pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/22114","html_url":"https://github.com/saltstack/salt/pull/22114","diff_url":"https://github.com/saltstack/salt/pull/22114.diff","patch_url":"https://github.com/saltstack/salt/pull/22114.patch"},"body":"When you have only one page you will get a KeyError\r\n\r\n```python\r\n[ERROR   ] There was an error running the function: 'pages'\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.6/site-packages/salt/cloud/cli.py\", line 245, in run\r\n    self.function_provider, self.function_name, kwargs\r\n  File \"/usr/lib/python2.6/site-packages/salt/cloud/__init__.py\", line 1492, in do_function\r\n    driver: self.clouds[fun](call='function')\r\n  File \"/usr/lib64/python2.6/contextlib.py\", line 34, in __exit__\r\n    self.gen.throw(type, value, traceback)\r\n  File \"/usr/lib/python2.6/site-packages/salt/utils/context.py\", line 42, in func_globals_inject\r\n    yield\r\n  File \"/usr/lib/python2.6/site-packages/salt/cloud/__init__.py\", line 1492, in do_function\r\n    driver: self.clouds[fun](call='function')\r\n  File \"/usr/lib/python2.6/site-packages/salt/cloud/clouds/digital_ocean_v2.py\", line 167, in list_nodes\r\n    fetch = 'next' in items['links']['pages']\r\nKeyError: 'pages'\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/103713573","html_url":"https://github.com/saltstack/salt/pull/22114#issuecomment-103713573","issue_url":"https://api.github.com/repos/saltstack/salt/issues/22114","id":103713573,"user":{"login":"rallytime","id":6547906,"avatar_url":"https://avatars.githubusercontent.com/u/6547906?v=3","gravatar_id":"","url":"https://api.github.com/users/rallytime","html_url":"https://github.com/rallytime","followers_url":"https://api.github.com/users/rallytime/followers","following_url":"https://api.github.com/users/rallytime/following{/other_user}","gists_url":"https://api.github.com/users/rallytime/gists{/gist_id}","starred_url":"https://api.github.com/users/rallytime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rallytime/subscriptions","organizations_url":"https://api.github.com/users/rallytime/orgs","repos_url":"https://api.github.com/users/rallytime/repos","events_url":"https://api.github.com/users/rallytime/events{/privacy}","received_events_url":"https://api.github.com/users/rallytime/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T01:29:52Z","updated_at":"2015-05-20T01:29:52Z","body":"I'll try this again once #23955 is merged."}}