{"action":"created","comment":{"url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/comments/73099412","id":73099412,"diff_hunk":"@@ -894,9 +892,7 @@ def handle_update(sensor, reading):\n             # This handler is called whenever a sensor update is received\n             try:\n                 assert sensor is self\n-                cond_matched = condition_test(reading)\n-                status_matched = reading.status == status or status is None","path":"katcp/resource.py","position":107,"original_position":107,"commit_id":"856d61c24464b667b00629859206ed0c4f022aa7","original_commit_id":"856d61c24464b667b00629859206ed0c4f022aa7","user":{"login":"theunsa","id":95486,"avatar_url":"https://avatars.githubusercontent.com/u/95486?v=3","gravatar_id":"","url":"https://api.github.com/users/theunsa","html_url":"https://github.com/theunsa","followers_url":"https://api.github.com/users/theunsa/followers","following_url":"https://api.github.com/users/theunsa/following{/other_user}","gists_url":"https://api.github.com/users/theunsa/gists{/gist_id}","starred_url":"https://api.github.com/users/theunsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theunsa/subscriptions","organizations_url":"https://api.github.com/users/theunsa/orgs","repos_url":"https://api.github.com/users/theunsa/repos","events_url":"https://api.github.com/users/theunsa/events{/privacy}","received_events_url":"https://api.github.com/users/theunsa/received_events","type":"User","site_admin":false},"body":"This explicit status check was originally included by @brickZA ... would like to hear his thoughts about dropping it.","created_at":"2016-08-02T06:17:31Z","updated_at":"2016-08-02T06:17:31Z","html_url":"https://github.com/ska-sa/katcp-python/pull/159#discussion_r73099412","pull_request_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/159","_links":{"self":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/comments/73099412"},"html":{"href":"https://github.com/ska-sa/katcp-python/pull/159#discussion_r73099412"},"pull_request":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/159"}}},"pull_request":{"url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/159","id":79434303,"html_url":"https://github.com/ska-sa/katcp-python/pull/159","diff_url":"https://github.com/ska-sa/katcp-python/pull/159.diff","patch_url":"https://github.com/ska-sa/katcp-python/pull/159.patch","issue_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/159","number":159,"state":"open","locked":false,"title":"Simplify sensor wait() interface","user":{"login":"ludwigschwardt","id":392144,"avatar_url":"https://avatars.githubusercontent.com/u/392144?v=3","gravatar_id":"","url":"https://api.github.com/users/ludwigschwardt","html_url":"https://github.com/ludwigschwardt","followers_url":"https://api.github.com/users/ludwigschwardt/followers","following_url":"https://api.github.com/users/ludwigschwardt/following{/other_user}","gists_url":"https://api.github.com/users/ludwigschwardt/gists{/gist_id}","starred_url":"https://api.github.com/users/ludwigschwardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ludwigschwardt/subscriptions","organizations_url":"https://api.github.com/users/ludwigschwardt/orgs","repos_url":"https://api.github.com/users/ludwigschwardt/repos","events_url":"https://api.github.com/users/ludwigschwardt/events{/privacy}","received_events_url":"https://api.github.com/users/ludwigschwardt/received_events","type":"User","site_admin":false},"body":"The current wait() machinery is unsatisfactory. If the sensor\r\nmeets the condition, wait() returns True. On the other hand,\r\nif the sensor does not meet the condition before the timeout,\r\na TimeoutError is raised. Wait() never returns False, making\r\nthe whole thing quite asymmetric.\r\n\r\nThe TimeoutErrors currently cause observation scripts to\r\ncrash (mostly for no good reason). Catching the exception\r\nwithin the observation framework is messy.\r\n\r\nMy proposal is to swallow the TimeoutError at the KATCPResource\r\nlevel and turn it into a proper symmetric False return.\r\nUser-facing client and client group objects will therefore\r\nnever crash like this again.\r\n\r\nIn addition, the ClientGroup.wait now returns extra information\r\nthat allows the user to report back on which clients have failed\r\nthe sensor condition without re-evaluating those conditions.\r\nUsers who don't care about the extra info can still simply check\r\nthe truth value of the returned dict.\r\n\r\nAs a further minor niggle, the explicit status check is dropped\r\nin favour of the existing sensor reading check that can handle\r\nall cases of interest.\r\n\r\nSince the session and observation scripts are the main users of\r\nwait(), I don't foresee any issues with the API change. All scripts\r\nin katsdpscripts master remain valid.\r\n\r\nThis addresses JIRA tickets [MKAIV-244](https://skaafrica.atlassian.net/browse/MKAIV-244), [MRTS-361](https://skaafrica.atlassian.net/browse/MRTS-361) and [MKAIV-126](https://skaafrica.atlassian.net/browse/MKAIV-126) and related ones (and also [KAT-1869](https://skaafrica.atlassian.net/browse/KAT-1869) to some extent).","created_at":"2016-07-29T22:36:12Z","updated_at":"2016-08-02T06:17:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"863492368b87088bb6dc5f930e35fabbd2bc1bb7","assignee":{"login":"theunsa","id":95486,"avatar_url":"https://avatars.githubusercontent.com/u/95486?v=3","gravatar_id":"","url":"https://api.github.com/users/theunsa","html_url":"https://github.com/theunsa","followers_url":"https://api.github.com/users/theunsa/followers","following_url":"https://api.github.com/users/theunsa/following{/other_user}","gists_url":"https://api.github.com/users/theunsa/gists{/gist_id}","starred_url":"https://api.github.com/users/theunsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theunsa/subscriptions","organizations_url":"https://api.github.com/users/theunsa/orgs","repos_url":"https://api.github.com/users/theunsa/repos","events_url":"https://api.github.com/users/theunsa/events{/privacy}","received_events_url":"https://api.github.com/users/theunsa/received_events","type":"User","site_admin":false},"assignees":[{"login":"theunsa","id":95486,"avatar_url":"https://avatars.githubusercontent.com/u/95486?v=3","gravatar_id":"","url":"https://api.github.com/users/theunsa","html_url":"https://github.com/theunsa","followers_url":"https://api.github.com/users/theunsa/followers","following_url":"https://api.github.com/users/theunsa/following{/other_user}","gists_url":"https://api.github.com/users/theunsa/gists{/gist_id}","starred_url":"https://api.github.com/users/theunsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theunsa/subscriptions","organizations_url":"https://api.github.com/users/theunsa/orgs","repos_url":"https://api.github.com/users/theunsa/repos","events_url":"https://api.github.com/users/theunsa/events{/privacy}","received_events_url":"https://api.github.com/users/theunsa/received_events","type":"User","site_admin":false},{"login":"martinslabber","id":123241,"avatar_url":"https://avatars.githubusercontent.com/u/123241?v=3","gravatar_id":"","url":"https://api.github.com/users/martinslabber","html_url":"https://github.com/martinslabber","followers_url":"https://api.github.com/users/martinslabber/followers","following_url":"https://api.github.com/users/martinslabber/following{/other_user}","gists_url":"https://api.github.com/users/martinslabber/gists{/gist_id}","starred_url":"https://api.github.com/users/martinslabber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinslabber/subscriptions","organizations_url":"https://api.github.com/users/martinslabber/orgs","repos_url":"https://api.github.com/users/martinslabber/repos","events_url":"https://api.github.com/users/martinslabber/events{/privacy}","received_events_url":"https://api.github.com/users/martinslabber/received_events","type":"User","site_admin":false},{"login":"brickZA","id":630432,"avatar_url":"https://avatars.githubusercontent.com/u/630432?v=3","gravatar_id":"","url":"https://api.github.com/users/brickZA","html_url":"https://github.com/brickZA","followers_url":"https://api.github.com/users/brickZA/followers","following_url":"https://api.github.com/users/brickZA/following{/other_user}","gists_url":"https://api.github.com/users/brickZA/gists{/gist_id}","starred_url":"https://api.github.com/users/brickZA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brickZA/subscriptions","organizations_url":"https://api.github.com/users/brickZA/orgs","repos_url":"https://api.github.com/users/brickZA/repos","events_url":"https://api.github.com/users/brickZA/events{/privacy}","received_events_url":"https://api.github.com/users/brickZA/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/159/commits","review_comments_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/159/comments","review_comment_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/159/comments","statuses_url":"https://api.github.com/repos/ska-sa/katcp-python/statuses/856d61c24464b667b00629859206ed0c4f022aa7","head":{"label":"ska-sa:clean-up-clientgroup-wait","ref":"clean-up-clientgroup-wait","sha":"856d61c24464b667b00629859206ed0c4f022aa7","user":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"repo":{"id":5854299,"name":"katcp-python","full_name":"ska-sa/katcp-python","owner":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ska-sa/katcp-python","description":"Python client and server library for the Karoo Array Telescope Control Protocol (KATCP)","fork":false,"url":"https://api.github.com/repos/ska-sa/katcp-python","forks_url":"https://api.github.com/repos/ska-sa/katcp-python/forks","keys_url":"https://api.github.com/repos/ska-sa/katcp-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ska-sa/katcp-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ska-sa/katcp-python/teams","hooks_url":"https://api.github.com/repos/ska-sa/katcp-python/hooks","issue_events_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/events{/number}","events_url":"https://api.github.com/repos/ska-sa/katcp-python/events","assignees_url":"https://api.github.com/repos/ska-sa/katcp-python/assignees{/user}","branches_url":"https://api.github.com/repos/ska-sa/katcp-python/branches{/branch}","tags_url":"https://api.github.com/repos/ska-sa/katcp-python/tags","blobs_url":"https://api.github.com/repos/ska-sa/katcp-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ska-sa/katcp-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ska-sa/katcp-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/ska-sa/katcp-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ska-sa/katcp-python/statuses/{sha}","languages_url":"https://api.github.com/repos/ska-sa/katcp-python/languages","stargazers_url":"https://api.github.com/repos/ska-sa/katcp-python/stargazers","contributors_url":"https://api.github.com/repos/ska-sa/katcp-python/contributors","subscribers_url":"https://api.github.com/repos/ska-sa/katcp-python/subscribers","subscription_url":"https://api.github.com/repos/ska-sa/katcp-python/subscription","commits_url":"https://api.github.com/repos/ska-sa/katcp-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/ska-sa/katcp-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/ska-sa/katcp-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/ska-sa/katcp-python/contents/{+path}","compare_url":"https://api.github.com/repos/ska-sa/katcp-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ska-sa/katcp-python/merges","archive_url":"https://api.github.com/repos/ska-sa/katcp-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ska-sa/katcp-python/downloads","issues_url":"https://api.github.com/repos/ska-sa/katcp-python/issues{/number}","pulls_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls{/number}","milestones_url":"https://api.github.com/repos/ska-sa/katcp-python/milestones{/number}","notifications_url":"https://api.github.com/repos/ska-sa/katcp-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ska-sa/katcp-python/labels{/name}","releases_url":"https://api.github.com/repos/ska-sa/katcp-python/releases{/id}","deployments_url":"https://api.github.com/repos/ska-sa/katcp-python/deployments","created_at":"2012-09-18T09:52:58Z","updated_at":"2016-02-07T09:15:16Z","pushed_at":"2016-08-01T07:56:06Z","git_url":"git://github.com/ska-sa/katcp-python.git","ssh_url":"git@github.com:ska-sa/katcp-python.git","clone_url":"https://github.com/ska-sa/katcp-python.git","svn_url":"https://github.com/ska-sa/katcp-python","homepage":null,"size":2769,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"ska-sa:master","ref":"master","sha":"da487f02e9f9c19aff149d40b1d981e98038d1ed","user":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"repo":{"id":5854299,"name":"katcp-python","full_name":"ska-sa/katcp-python","owner":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ska-sa/katcp-python","description":"Python client and server library for the Karoo Array Telescope Control Protocol (KATCP)","fork":false,"url":"https://api.github.com/repos/ska-sa/katcp-python","forks_url":"https://api.github.com/repos/ska-sa/katcp-python/forks","keys_url":"https://api.github.com/repos/ska-sa/katcp-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ska-sa/katcp-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ska-sa/katcp-python/teams","hooks_url":"https://api.github.com/repos/ska-sa/katcp-python/hooks","issue_events_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/events{/number}","events_url":"https://api.github.com/repos/ska-sa/katcp-python/events","assignees_url":"https://api.github.com/repos/ska-sa/katcp-python/assignees{/user}","branches_url":"https://api.github.com/repos/ska-sa/katcp-python/branches{/branch}","tags_url":"https://api.github.com/repos/ska-sa/katcp-python/tags","blobs_url":"https://api.github.com/repos/ska-sa/katcp-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ska-sa/katcp-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ska-sa/katcp-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/ska-sa/katcp-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ska-sa/katcp-python/statuses/{sha}","languages_url":"https://api.github.com/repos/ska-sa/katcp-python/languages","stargazers_url":"https://api.github.com/repos/ska-sa/katcp-python/stargazers","contributors_url":"https://api.github.com/repos/ska-sa/katcp-python/contributors","subscribers_url":"https://api.github.com/repos/ska-sa/katcp-python/subscribers","subscription_url":"https://api.github.com/repos/ska-sa/katcp-python/subscription","commits_url":"https://api.github.com/repos/ska-sa/katcp-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/ska-sa/katcp-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/ska-sa/katcp-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/ska-sa/katcp-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/ska-sa/katcp-python/contents/{+path}","compare_url":"https://api.github.com/repos/ska-sa/katcp-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ska-sa/katcp-python/merges","archive_url":"https://api.github.com/repos/ska-sa/katcp-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ska-sa/katcp-python/downloads","issues_url":"https://api.github.com/repos/ska-sa/katcp-python/issues{/number}","pulls_url":"https://api.github.com/repos/ska-sa/katcp-python/pulls{/number}","milestones_url":"https://api.github.com/repos/ska-sa/katcp-python/milestones{/number}","notifications_url":"https://api.github.com/repos/ska-sa/katcp-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ska-sa/katcp-python/labels{/name}","releases_url":"https://api.github.com/repos/ska-sa/katcp-python/releases{/id}","deployments_url":"https://api.github.com/repos/ska-sa/katcp-python/deployments","created_at":"2012-09-18T09:52:58Z","updated_at":"2016-02-07T09:15:16Z","pushed_at":"2016-08-01T07:56:06Z","git_url":"git://github.com/ska-sa/katcp-python.git","ssh_url":"git@github.com:ska-sa/katcp-python.git","clone_url":"https://github.com/ska-sa/katcp-python.git","svn_url":"https://github.com/ska-sa/katcp-python","homepage":null,"size":2769,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/159"},"html":{"href":"https://github.com/ska-sa/katcp-python/pull/159"},"issue":{"href":"https://api.github.com/repos/ska-sa/katcp-python/issues/159"},"comments":{"href":"https://api.github.com/repos/ska-sa/katcp-python/issues/159/comments"},"review_comments":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/159/comments"},"review_comment":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ska-sa/katcp-python/pulls/159/commits"},"statuses":{"href":"https://api.github.com/repos/ska-sa/katcp-python/statuses/856d61c24464b667b00629859206ed0c4f022aa7"}}}}
{"actor":{"display_login":"theunsa"}}