{"action":"created","comment":{"url":"https://api.github.com/repos/bbc/nmos-query/pulls/comments/226286987","pull_request_review_id":166070114,"id":226286987,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjI4Njk4Nw==","diff_hunk":"@@ -98,13 +98,21 @@ def del_sock(self, sock):\n         except ValueError:\n             self.logger.writeWarning(\"del_sock: attempt to remove socket that did not exist\")\n \n+    def match_sock(self, sock, opts):\n+        \"\"\"Check if the socket matches the requested opts using the following parameters\"\"\"\n+        checked_params = [(\"resource_path\", ''), (\"secure\", False), (\"max_update_rate_ms\", 100), (\"params\", {})]\n+        for param in checked_params:","path":"nmosquery/common/querysockets.py","position":7,"original_position":7,"commit_id":"f27ee0282cffbd6672ad2b1fefbfd6afccded56e","original_commit_id":"f27ee0282cffbd6672ad2b1fefbfd6afccded56e","user":{"login":"simonrankine","id":16780573,"node_id":"MDQ6VXNlcjE2NzgwNTcz","avatar_url":"https://avatars2.githubusercontent.com/u/16780573?v=4","gravatar_id":"","url":"https://api.github.com/users/simonrankine","html_url":"https://github.com/simonrankine","followers_url":"https://api.github.com/users/simonrankine/followers","following_url":"https://api.github.com/users/simonrankine/following{/other_user}","gists_url":"https://api.github.com/users/simonrankine/gists{/gist_id}","starred_url":"https://api.github.com/users/simonrankine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonrankine/subscriptions","organizations_url":"https://api.github.com/users/simonrankine/orgs","repos_url":"https://api.github.com/users/simonrankine/repos","events_url":"https://api.github.com/users/simonrankine/events{/privacy}","received_events_url":"https://api.github.com/users/simonrankine/received_events","type":"User","site_admin":false},"body":"How about:\r\n```\r\nfor key, value in checked_paras:\r\n    if getattr(sock, key) != opts.get(key, value):\r\n```\r\n\r\netc","created_at":"2018-10-18T12:38:13Z","updated_at":"2018-10-18T12:39:47Z","html_url":"https://github.com/bbc/nmos-query/pull/16#discussion_r226286987","pull_request_url":"https://api.github.com/repos/bbc/nmos-query/pulls/16","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/bbc/nmos-query/pulls/comments/226286987"},"html":{"href":"https://github.com/bbc/nmos-query/pull/16#discussion_r226286987"},"pull_request":{"href":"https://api.github.com/repos/bbc/nmos-query/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/bbc/nmos-query/pulls/16","id":223533154,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzNTMzMTU0","html_url":"https://github.com/bbc/nmos-query/pull/16","diff_url":"https://github.com/bbc/nmos-query/pull/16.diff","patch_url":"https://github.com/bbc/nmos-query/pull/16.patch","issue_url":"https://api.github.com/repos/bbc/nmos-query/issues/16","number":16,"state":"open","locked":false,"title":"sockets: fix detection of existing matching sockets","user":{"login":"andrewbonney","id":715421,"node_id":"MDQ6VXNlcjcxNTQyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/715421?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewbonney","html_url":"https://github.com/andrewbonney","followers_url":"https://api.github.com/users/andrewbonney/followers","following_url":"https://api.github.com/users/andrewbonney/following{/other_user}","gists_url":"https://api.github.com/users/andrewbonney/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewbonney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewbonney/subscriptions","organizations_url":"https://api.github.com/users/andrewbonney/orgs","repos_url":"https://api.github.com/users/andrewbonney/repos","events_url":"https://api.github.com/users/andrewbonney/events{/privacy}","received_events_url":"https://api.github.com/users/andrewbonney/received_events","type":"User","site_admin":false},"body":"Resolves #13 ","created_at":"2018-10-17T09:38:57Z","updated_at":"2018-10-18T12:39:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"012689a02f709505f7e159d74bb3012fe01e083c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bbc/nmos-query/pulls/16/commits","review_comments_url":"https://api.github.com/repos/bbc/nmos-query/pulls/16/comments","review_comment_url":"https://api.github.com/repos/bbc/nmos-query/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbc/nmos-query/issues/16/comments","statuses_url":"https://api.github.com/repos/bbc/nmos-query/statuses/f27ee0282cffbd6672ad2b1fefbfd6afccded56e","head":{"label":"bbc:andrewbo-sockets","ref":"andrewbo-sockets","sha":"f27ee0282cffbd6672ad2b1fefbfd6afccded56e","user":{"login":"bbc","id":828722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyODcyMg==","avatar_url":"https://avatars1.githubusercontent.com/u/828722?v=4","gravatar_id":"","url":"https://api.github.com/users/bbc","html_url":"https://github.com/bbc","followers_url":"https://api.github.com/users/bbc/followers","following_url":"https://api.github.com/users/bbc/following{/other_user}","gists_url":"https://api.github.com/users/bbc/gists{/gist_id}","starred_url":"https://api.github.com/users/bbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbc/subscriptions","organizations_url":"https://api.github.com/users/bbc/orgs","repos_url":"https://api.github.com/users/bbc/repos","events_url":"https://api.github.com/users/bbc/events{/privacy}","received_events_url":"https://api.github.com/users/bbc/received_events","type":"Organization","site_admin":false},"repo":{"id":105925634,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU5MjU2MzQ=","name":"nmos-query","full_name":"bbc/nmos-query","private":false,"owner":{"login":"bbc","id":828722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyODcyMg==","avatar_url":"https://avatars1.githubusercontent.com/u/828722?v=4","gravatar_id":"","url":"https://api.github.com/users/bbc","html_url":"https://github.com/bbc","followers_url":"https://api.github.com/users/bbc/followers","following_url":"https://api.github.com/users/bbc/following{/other_user}","gists_url":"https://api.github.com/users/bbc/gists{/gist_id}","starred_url":"https://api.github.com/users/bbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbc/subscriptions","organizations_url":"https://api.github.com/users/bbc/orgs","repos_url":"https://api.github.com/users/bbc/repos","events_url":"https://api.github.com/users/bbc/events{/privacy}","received_events_url":"https://api.github.com/users/bbc/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bbc/nmos-query","description":"AMWA NMOS IS-04 Query API Service","fork":false,"url":"https://api.github.com/repos/bbc/nmos-query","forks_url":"https://api.github.com/repos/bbc/nmos-query/forks","keys_url":"https://api.github.com/repos/bbc/nmos-query/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbc/nmos-query/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbc/nmos-query/teams","hooks_url":"https://api.github.com/repos/bbc/nmos-query/hooks","issue_events_url":"https://api.github.com/repos/bbc/nmos-query/issues/events{/number}","events_url":"https://api.github.com/repos/bbc/nmos-query/events","assignees_url":"https://api.github.com/repos/bbc/nmos-query/assignees{/user}","branches_url":"https://api.github.com/repos/bbc/nmos-query/branches{/branch}","tags_url":"https://api.github.com/repos/bbc/nmos-query/tags","blobs_url":"https://api.github.com/repos/bbc/nmos-query/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbc/nmos-query/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbc/nmos-query/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbc/nmos-query/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbc/nmos-query/statuses/{sha}","languages_url":"https://api.github.com/repos/bbc/nmos-query/languages","stargazers_url":"https://api.github.com/repos/bbc/nmos-query/stargazers","contributors_url":"https://api.github.com/repos/bbc/nmos-query/contributors","subscribers_url":"https://api.github.com/repos/bbc/nmos-query/subscribers","subscription_url":"https://api.github.com/repos/bbc/nmos-query/subscription","commits_url":"https://api.github.com/repos/bbc/nmos-query/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbc/nmos-query/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbc/nmos-query/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbc/nmos-query/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbc/nmos-query/contents/{+path}","compare_url":"https://api.github.com/repos/bbc/nmos-query/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbc/nmos-query/merges","archive_url":"https://api.github.com/repos/bbc/nmos-query/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbc/nmos-query/downloads","issues_url":"https://api.github.com/repos/bbc/nmos-query/issues{/number}","pulls_url":"https://api.github.com/repos/bbc/nmos-query/pulls{/number}","milestones_url":"https://api.github.com/repos/bbc/nmos-query/milestones{/number}","notifications_url":"https://api.github.com/repos/bbc/nmos-query/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbc/nmos-query/labels{/name}","releases_url":"https://api.github.com/repos/bbc/nmos-query/releases{/id}","deployments_url":"https://api.github.com/repos/bbc/nmos-query/deployments","created_at":"2017-10-05T18:29:38Z","updated_at":"2018-08-28T12:01:16Z","pushed_at":"2018-10-18T12:34:57Z","git_url":"git://github.com/bbc/nmos-query.git","ssh_url":"git@github.com:bbc/nmos-query.git","clone_url":"https://github.com/bbc/nmos-query.git","svn_url":"https://github.com/bbc/nmos-query","homepage":null,"size":101,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":5,"watchers":2,"default_branch":"master"}},"base":{"label":"bbc:master","ref":"master","sha":"363affc9a649ad938900851076e123bd469b72ce","user":{"login":"bbc","id":828722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyODcyMg==","avatar_url":"https://avatars1.githubusercontent.com/u/828722?v=4","gravatar_id":"","url":"https://api.github.com/users/bbc","html_url":"https://github.com/bbc","followers_url":"https://api.github.com/users/bbc/followers","following_url":"https://api.github.com/users/bbc/following{/other_user}","gists_url":"https://api.github.com/users/bbc/gists{/gist_id}","starred_url":"https://api.github.com/users/bbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbc/subscriptions","organizations_url":"https://api.github.com/users/bbc/orgs","repos_url":"https://api.github.com/users/bbc/repos","events_url":"https://api.github.com/users/bbc/events{/privacy}","received_events_url":"https://api.github.com/users/bbc/received_events","type":"Organization","site_admin":false},"repo":{"id":105925634,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU5MjU2MzQ=","name":"nmos-query","full_name":"bbc/nmos-query","private":false,"owner":{"login":"bbc","id":828722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyODcyMg==","avatar_url":"https://avatars1.githubusercontent.com/u/828722?v=4","gravatar_id":"","url":"https://api.github.com/users/bbc","html_url":"https://github.com/bbc","followers_url":"https://api.github.com/users/bbc/followers","following_url":"https://api.github.com/users/bbc/following{/other_user}","gists_url":"https://api.github.com/users/bbc/gists{/gist_id}","starred_url":"https://api.github.com/users/bbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbc/subscriptions","organizations_url":"https://api.github.com/users/bbc/orgs","repos_url":"https://api.github.com/users/bbc/repos","events_url":"https://api.github.com/users/bbc/events{/privacy}","received_events_url":"https://api.github.com/users/bbc/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bbc/nmos-query","description":"AMWA NMOS IS-04 Query API Service","fork":false,"url":"https://api.github.com/repos/bbc/nmos-query","forks_url":"https://api.github.com/repos/bbc/nmos-query/forks","keys_url":"https://api.github.com/repos/bbc/nmos-query/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbc/nmos-query/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbc/nmos-query/teams","hooks_url":"https://api.github.com/repos/bbc/nmos-query/hooks","issue_events_url":"https://api.github.com/repos/bbc/nmos-query/issues/events{/number}","events_url":"https://api.github.com/repos/bbc/nmos-query/events","assignees_url":"https://api.github.com/repos/bbc/nmos-query/assignees{/user}","branches_url":"https://api.github.com/repos/bbc/nmos-query/branches{/branch}","tags_url":"https://api.github.com/repos/bbc/nmos-query/tags","blobs_url":"https://api.github.com/repos/bbc/nmos-query/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbc/nmos-query/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbc/nmos-query/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbc/nmos-query/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbc/nmos-query/statuses/{sha}","languages_url":"https://api.github.com/repos/bbc/nmos-query/languages","stargazers_url":"https://api.github.com/repos/bbc/nmos-query/stargazers","contributors_url":"https://api.github.com/repos/bbc/nmos-query/contributors","subscribers_url":"https://api.github.com/repos/bbc/nmos-query/subscribers","subscription_url":"https://api.github.com/repos/bbc/nmos-query/subscription","commits_url":"https://api.github.com/repos/bbc/nmos-query/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbc/nmos-query/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbc/nmos-query/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbc/nmos-query/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbc/nmos-query/contents/{+path}","compare_url":"https://api.github.com/repos/bbc/nmos-query/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbc/nmos-query/merges","archive_url":"https://api.github.com/repos/bbc/nmos-query/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbc/nmos-query/downloads","issues_url":"https://api.github.com/repos/bbc/nmos-query/issues{/number}","pulls_url":"https://api.github.com/repos/bbc/nmos-query/pulls{/number}","milestones_url":"https://api.github.com/repos/bbc/nmos-query/milestones{/number}","notifications_url":"https://api.github.com/repos/bbc/nmos-query/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbc/nmos-query/labels{/name}","releases_url":"https://api.github.com/repos/bbc/nmos-query/releases{/id}","deployments_url":"https://api.github.com/repos/bbc/nmos-query/deployments","created_at":"2017-10-05T18:29:38Z","updated_at":"2018-08-28T12:01:16Z","pushed_at":"2018-10-18T12:34:57Z","git_url":"git://github.com/bbc/nmos-query.git","ssh_url":"git@github.com:bbc/nmos-query.git","clone_url":"https://github.com/bbc/nmos-query.git","svn_url":"https://github.com/bbc/nmos-query","homepage":null,"size":101,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bbc/nmos-query/pulls/16"},"html":{"href":"https://github.com/bbc/nmos-query/pull/16"},"issue":{"href":"https://api.github.com/repos/bbc/nmos-query/issues/16"},"comments":{"href":"https://api.github.com/repos/bbc/nmos-query/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/bbc/nmos-query/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/bbc/nmos-query/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbc/nmos-query/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/bbc/nmos-query/statuses/f27ee0282cffbd6672ad2b1fefbfd6afccded56e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"simonrankine"}}