{"action":"created","comment":{"url":"https://api.github.com/repos/girder/girder/pulls/comments/23321677","id":23321677,"diff_hunk":"@@ -64,7 +64,12 @@ def loop(self):\n         exit.\n         \"\"\"\n         while len(asyncore.socket_map):\n-            asyncore.loop(timeout=1, use_poll=True)\n+            try:\n+                asyncore.loop(timeout=1, use_poll=True)\n+            except asyncore.select.error as e:\n+                if getattr(e, 'args', [None])[0] == 9:\n+                    return\n+                raise e","path":"tests/mock_smtp.py","position":10,"original_position":10,"commit_id":"c06f3cc730f02efe2a527e94436c924e628707f6","original_commit_id":"c06f3cc730f02efe2a527e94436c924e628707f6","user":{"login":"ronichoudhury","id":2903332,"avatar_url":"https://avatars.githubusercontent.com/u/2903332?v=3","gravatar_id":"","url":"https://api.github.com/users/ronichoudhury","html_url":"https://github.com/ronichoudhury","followers_url":"https://api.github.com/users/ronichoudhury/followers","following_url":"https://api.github.com/users/ronichoudhury/following{/other_user}","gists_url":"https://api.github.com/users/ronichoudhury/gists{/gist_id}","starred_url":"https://api.github.com/users/ronichoudhury/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronichoudhury/subscriptions","organizations_url":"https://api.github.com/users/ronichoudhury/orgs","repos_url":"https://api.github.com/users/ronichoudhury/repos","events_url":"https://api.github.com/users/ronichoudhury/events{/privacy}","received_events_url":"https://api.github.com/users/ronichoudhury/received_events","type":"User","site_admin":false},"body":"I think this can just be\r\n\r\n    raise","created_at":"2015-01-21T18:28:11Z","updated_at":"2015-01-21T18:28:11Z","html_url":"https://github.com/girder/girder/pull/642#discussion_r23321677","pull_request_url":"https://api.github.com/repos/girder/girder/pulls/642","_links":{"self":{"href":"https://api.github.com/repos/girder/girder/pulls/comments/23321677"},"html":{"href":"https://github.com/girder/girder/pull/642#discussion_r23321677"},"pull_request":{"href":"https://api.github.com/repos/girder/girder/pulls/642"}}},"pull_request":{"url":"https://api.github.com/repos/girder/girder/pulls/642","id":27782587,"html_url":"https://github.com/girder/girder/pull/642","diff_url":"https://github.com/girder/girder/pull/642.diff","patch_url":"https://github.com/girder/girder/pull/642.patch","issue_url":"https://api.github.com/repos/girder/girder/issues/642","number":642,"state":"open","locked":false,"title":"Fixing testing problems that occur in asyncore loop","user":{"login":"jbeezley","id":31890,"avatar_url":"https://avatars.githubusercontent.com/u/31890?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeezley","html_url":"https://github.com/jbeezley","followers_url":"https://api.github.com/users/jbeezley/followers","following_url":"https://api.github.com/users/jbeezley/following{/other_user}","gists_url":"https://api.github.com/users/jbeezley/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeezley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeezley/subscriptions","organizations_url":"https://api.github.com/users/jbeezley/orgs","repos_url":"https://api.github.com/users/jbeezley/repos","events_url":"https://api.github.com/users/jbeezley/events{/privacy}","received_events_url":"https://api.github.com/users/jbeezley/received_events","type":"User","site_admin":false},"body":"While running tests locally, I get messages like this popping up:\r\n```python\r\n15: Exception in thread Thread-3:\r\n15: Traceback (most recent call last):\r\n15:   File \"/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py\", line 810, in __bootstrap_inner\r\n15:     self.run()\r\n15:   File \"/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py\", line 763, in run\r\n15:     self.__target(*self.__args, **self.__kwargs)\r\n15:   File \"tests/mock_smtp.py\", line 69, in loop\r\n15:     asyncore.loop(timeout=1, use_poll=True)\r\n15:   File \"/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py\", line 216, in loop\r\n15:     poll_fun(timeout, map)\r\n15:   File \"/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py\", line 145, in poll\r\n15:     r, w, e = select.select(r, w, e, timeout)\r\n15: error: (9, 'Bad file descriptor')\r\n```\r\nIt appears to be the same issue mentioned [here](http://bugs.python.org/issue10878).\r\n\r\nThe tests pass, but file descriptors aren't closed causing the ctest process to hang eventually.  This seems to fix the problem on my end.","created_at":"2015-01-21T18:26:26Z","updated_at":"2015-01-21T18:28:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f6ebd34ac9ec8bea504d330a3c3e56719e8041f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/girder/girder/pulls/642/commits","review_comments_url":"https://api.github.com/repos/girder/girder/pulls/642/comments","review_comment_url":"https://api.github.com/repos/girder/girder/pulls/comments/{number}","comments_url":"https://api.github.com/repos/girder/girder/issues/642/comments","statuses_url":"https://api.github.com/repos/girder/girder/statuses/c06f3cc730f02efe2a527e94436c924e628707f6","head":{"label":"girder:test-asyncore-issues","ref":"test-asyncore-issues","sha":"c06f3cc730f02efe2a527e94436c924e628707f6","user":{"login":"girder","id":5150517,"avatar_url":"https://avatars.githubusercontent.com/u/5150517?v=3","gravatar_id":"","url":"https://api.github.com/users/girder","html_url":"https://github.com/girder","followers_url":"https://api.github.com/users/girder/followers","following_url":"https://api.github.com/users/girder/following{/other_user}","gists_url":"https://api.github.com/users/girder/gists{/gist_id}","starred_url":"https://api.github.com/users/girder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girder/subscriptions","organizations_url":"https://api.github.com/users/girder/orgs","repos_url":"https://api.github.com/users/girder/repos","events_url":"https://api.github.com/users/girder/events{/privacy}","received_events_url":"https://api.github.com/users/girder/received_events","type":"Organization","site_admin":false},"repo":{"id":11854950,"name":"girder","full_name":"girder/girder","owner":{"login":"girder","id":5150517,"avatar_url":"https://avatars.githubusercontent.com/u/5150517?v=3","gravatar_id":"","url":"https://api.github.com/users/girder","html_url":"https://github.com/girder","followers_url":"https://api.github.com/users/girder/followers","following_url":"https://api.github.com/users/girder/following{/other_user}","gists_url":"https://api.github.com/users/girder/gists{/gist_id}","starred_url":"https://api.github.com/users/girder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girder/subscriptions","organizations_url":"https://api.github.com/users/girder/orgs","repos_url":"https://api.github.com/users/girder/repos","events_url":"https://api.github.com/users/girder/events{/privacy}","received_events_url":"https://api.github.com/users/girder/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/girder/girder","description":"High performance data management for the web","fork":false,"url":"https://api.github.com/repos/girder/girder","forks_url":"https://api.github.com/repos/girder/girder/forks","keys_url":"https://api.github.com/repos/girder/girder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/girder/girder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/girder/girder/teams","hooks_url":"https://api.github.com/repos/girder/girder/hooks","issue_events_url":"https://api.github.com/repos/girder/girder/issues/events{/number}","events_url":"https://api.github.com/repos/girder/girder/events","assignees_url":"https://api.github.com/repos/girder/girder/assignees{/user}","branches_url":"https://api.github.com/repos/girder/girder/branches{/branch}","tags_url":"https://api.github.com/repos/girder/girder/tags","blobs_url":"https://api.github.com/repos/girder/girder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/girder/girder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/girder/girder/git/refs{/sha}","trees_url":"https://api.github.com/repos/girder/girder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/girder/girder/statuses/{sha}","languages_url":"https://api.github.com/repos/girder/girder/languages","stargazers_url":"https://api.github.com/repos/girder/girder/stargazers","contributors_url":"https://api.github.com/repos/girder/girder/contributors","subscribers_url":"https://api.github.com/repos/girder/girder/subscribers","subscription_url":"https://api.github.com/repos/girder/girder/subscription","commits_url":"https://api.github.com/repos/girder/girder/commits{/sha}","git_commits_url":"https://api.github.com/repos/girder/girder/git/commits{/sha}","comments_url":"https://api.github.com/repos/girder/girder/comments{/number}","issue_comment_url":"https://api.github.com/repos/girder/girder/issues/comments/{number}","contents_url":"https://api.github.com/repos/girder/girder/contents/{+path}","compare_url":"https://api.github.com/repos/girder/girder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/girder/girder/merges","archive_url":"https://api.github.com/repos/girder/girder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/girder/girder/downloads","issues_url":"https://api.github.com/repos/girder/girder/issues{/number}","pulls_url":"https://api.github.com/repos/girder/girder/pulls{/number}","milestones_url":"https://api.github.com/repos/girder/girder/milestones{/number}","notifications_url":"https://api.github.com/repos/girder/girder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/girder/girder/labels{/name}","releases_url":"https://api.github.com/repos/girder/girder/releases{/id}","created_at":"2013-08-02T23:55:54Z","updated_at":"2015-01-21T17:32:20Z","pushed_at":"2015-01-21T18:22:28Z","git_url":"git://github.com/girder/girder.git","ssh_url":"git@github.com:girder/girder.git","clone_url":"https://github.com/girder/girder.git","svn_url":"https://github.com/girder/girder","homepage":"http://girder.readthedocs.org","size":9371,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":66,"forks":18,"open_issues":66,"watchers":17,"default_branch":"master"}},"base":{"label":"girder:master","ref":"master","sha":"4747b1eb779dc1b5f4dca040345fc9aea68fc3ef","user":{"login":"girder","id":5150517,"avatar_url":"https://avatars.githubusercontent.com/u/5150517?v=3","gravatar_id":"","url":"https://api.github.com/users/girder","html_url":"https://github.com/girder","followers_url":"https://api.github.com/users/girder/followers","following_url":"https://api.github.com/users/girder/following{/other_user}","gists_url":"https://api.github.com/users/girder/gists{/gist_id}","starred_url":"https://api.github.com/users/girder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girder/subscriptions","organizations_url":"https://api.github.com/users/girder/orgs","repos_url":"https://api.github.com/users/girder/repos","events_url":"https://api.github.com/users/girder/events{/privacy}","received_events_url":"https://api.github.com/users/girder/received_events","type":"Organization","site_admin":false},"repo":{"id":11854950,"name":"girder","full_name":"girder/girder","owner":{"login":"girder","id":5150517,"avatar_url":"https://avatars.githubusercontent.com/u/5150517?v=3","gravatar_id":"","url":"https://api.github.com/users/girder","html_url":"https://github.com/girder","followers_url":"https://api.github.com/users/girder/followers","following_url":"https://api.github.com/users/girder/following{/other_user}","gists_url":"https://api.github.com/users/girder/gists{/gist_id}","starred_url":"https://api.github.com/users/girder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girder/subscriptions","organizations_url":"https://api.github.com/users/girder/orgs","repos_url":"https://api.github.com/users/girder/repos","events_url":"https://api.github.com/users/girder/events{/privacy}","received_events_url":"https://api.github.com/users/girder/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/girder/girder","description":"High performance data management for the web","fork":false,"url":"https://api.github.com/repos/girder/girder","forks_url":"https://api.github.com/repos/girder/girder/forks","keys_url":"https://api.github.com/repos/girder/girder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/girder/girder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/girder/girder/teams","hooks_url":"https://api.github.com/repos/girder/girder/hooks","issue_events_url":"https://api.github.com/repos/girder/girder/issues/events{/number}","events_url":"https://api.github.com/repos/girder/girder/events","assignees_url":"https://api.github.com/repos/girder/girder/assignees{/user}","branches_url":"https://api.github.com/repos/girder/girder/branches{/branch}","tags_url":"https://api.github.com/repos/girder/girder/tags","blobs_url":"https://api.github.com/repos/girder/girder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/girder/girder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/girder/girder/git/refs{/sha}","trees_url":"https://api.github.com/repos/girder/girder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/girder/girder/statuses/{sha}","languages_url":"https://api.github.com/repos/girder/girder/languages","stargazers_url":"https://api.github.com/repos/girder/girder/stargazers","contributors_url":"https://api.github.com/repos/girder/girder/contributors","subscribers_url":"https://api.github.com/repos/girder/girder/subscribers","subscription_url":"https://api.github.com/repos/girder/girder/subscription","commits_url":"https://api.github.com/repos/girder/girder/commits{/sha}","git_commits_url":"https://api.github.com/repos/girder/girder/git/commits{/sha}","comments_url":"https://api.github.com/repos/girder/girder/comments{/number}","issue_comment_url":"https://api.github.com/repos/girder/girder/issues/comments/{number}","contents_url":"https://api.github.com/repos/girder/girder/contents/{+path}","compare_url":"https://api.github.com/repos/girder/girder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/girder/girder/merges","archive_url":"https://api.github.com/repos/girder/girder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/girder/girder/downloads","issues_url":"https://api.github.com/repos/girder/girder/issues{/number}","pulls_url":"https://api.github.com/repos/girder/girder/pulls{/number}","milestones_url":"https://api.github.com/repos/girder/girder/milestones{/number}","notifications_url":"https://api.github.com/repos/girder/girder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/girder/girder/labels{/name}","releases_url":"https://api.github.com/repos/girder/girder/releases{/id}","created_at":"2013-08-02T23:55:54Z","updated_at":"2015-01-21T17:32:20Z","pushed_at":"2015-01-21T18:22:28Z","git_url":"git://github.com/girder/girder.git","ssh_url":"git@github.com:girder/girder.git","clone_url":"https://github.com/girder/girder.git","svn_url":"https://github.com/girder/girder","homepage":"http://girder.readthedocs.org","size":9371,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":66,"forks":18,"open_issues":66,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/girder/girder/pulls/642"},"html":{"href":"https://github.com/girder/girder/pull/642"},"issue":{"href":"https://api.github.com/repos/girder/girder/issues/642"},"comments":{"href":"https://api.github.com/repos/girder/girder/issues/642/comments"},"review_comments":{"href":"https://api.github.com/repos/girder/girder/pulls/642/comments"},"review_comment":{"href":"https://api.github.com/repos/girder/girder/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/girder/girder/pulls/642/commits"},"statuses":{"href":"https://api.github.com/repos/girder/girder/statuses/c06f3cc730f02efe2a527e94436c924e628707f6"}}}}