{"action":"created","issue":{"url":"https://api.github.com/repos/joeljames/py-shared-utils/issues/4","repository_url":"https://api.github.com/repos/joeljames/py-shared-utils","labels_url":"https://api.github.com/repos/joeljames/py-shared-utils/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/joeljames/py-shared-utils/issues/4/comments","events_url":"https://api.github.com/repos/joeljames/py-shared-utils/issues/4/events","html_url":"https://github.com/joeljames/py-shared-utils/pull/4","id":197210855,"number":4,"title":"Handle lists of non dicts in compact_dict","user":{"login":"petebrowne","id":23861,"avatar_url":"https://avatars.githubusercontent.com/u/23861?v=3","gravatar_id":"","url":"https://api.github.com/users/petebrowne","html_url":"https://github.com/petebrowne","followers_url":"https://api.github.com/users/petebrowne/followers","following_url":"https://api.github.com/users/petebrowne/following{/other_user}","gists_url":"https://api.github.com/users/petebrowne/gists{/gist_id}","starred_url":"https://api.github.com/users/petebrowne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebrowne/subscriptions","organizations_url":"https://api.github.com/users/petebrowne/orgs","repos_url":"https://api.github.com/users/petebrowne/repos","events_url":"https://api.github.com/users/petebrowne/events{/privacy}","received_events_url":"https://api.github.com/users/petebrowne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-22T16:21:13Z","updated_at":"2016-12-22T16:55:48Z","closed_at":"2016-12-22T16:47:20Z","pull_request":{"url":"https://api.github.com/repos/joeljames/py-shared-utils/pulls/4","html_url":"https://github.com/joeljames/py-shared-utils/pull/4","diff_url":"https://github.com/joeljames/py-shared-utils/pull/4.diff","patch_url":"https://github.com/joeljames/py-shared-utils/pull/4.patch"},"body":"If you call `compact_dict` with a dict that contains a list of anything other than a dict, it throws an error:\r\n\r\n```python\r\n>>> compact_dict({'roles': ['admin']})\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\r\n    self.test(*self.arg)\r\n  File \"/Users/Peter/Code/py-shared-utils/tests/pysharedutils/dicts_tests.py\", line 90, in test_compact_dict\r\n    output = pysharedutils.compact_dict(data)\r\n  File \"/Users/Peter/Code/py-shared-utils/pysharedutils/dicts.py\", line 139, in compact_dict\r\n    element = compact_dict(i)\r\n  File \"/Users/Peter/Code/py-shared-utils/pysharedutils/dicts.py\", line 132, in compact_dict\r\n    for key, value in six.iteritems(obj):\r\n  File \"/usr/local/lib/python2.7/site-packages/six.py\", line 576, in iteritems\r\n    return iter(d.iteritems(**kw))\r\nAttributeError: 'str' object has no attribute 'iteritems'\r\n```"},"comment":{"url":"https://api.github.com/repos/joeljames/py-shared-utils/issues/comments/268842019","html_url":"https://github.com/joeljames/py-shared-utils/pull/4#issuecomment-268842019","issue_url":"https://api.github.com/repos/joeljames/py-shared-utils/issues/4","id":268842019,"user":{"login":"joeljames","id":1213641,"avatar_url":"https://avatars.githubusercontent.com/u/1213641?v=3","gravatar_id":"","url":"https://api.github.com/users/joeljames","html_url":"https://github.com/joeljames","followers_url":"https://api.github.com/users/joeljames/followers","following_url":"https://api.github.com/users/joeljames/following{/other_user}","gists_url":"https://api.github.com/users/joeljames/gists{/gist_id}","starred_url":"https://api.github.com/users/joeljames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeljames/subscriptions","organizations_url":"https://api.github.com/users/joeljames/orgs","repos_url":"https://api.github.com/users/joeljames/repos","events_url":"https://api.github.com/users/joeljames/events{/privacy}","received_events_url":"https://api.github.com/users/joeljames/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T16:55:48Z","updated_at":"2016-12-22T16:55:48Z","body":"Pushed up a new release with the changes. Version 0.4.2 has the changes https://pypi.python.org/pypi/pysharedutils/0.4.2"}}
{"actor":{"display_login":"joeljames"}}