{"action":"created","comment":{"url":"https://api.github.com/repos/weewx/weewx/pulls/comments/55026263","id":55026263,"diff_hunk":"@@ -478,120 +518,182 @@ def genDavisLoopPackets(self, N=1):\n         \n         self.port.wakeup_console(self.max_tries, self.wait_before_retry)\n         \n-        # Request N packets:\n-        self.port.send_data(\"LOOP %d\\n\" % N)\n-        \n-        ntries = 1\n-        \n-        for loop in range(N):\n-            \n-            if ntries > self.max_tries:\n-                syslog.syslog(syslog.LOG_ERR, \"vantage: Max retries (%d) exceeded.\" % self.max_tries)\n-                raise weewx.RetriesExceeded(\"Max retries exceeded while getting LOOP data.\")\n-\n-            try:\n-                # Fetch a packet\n-                _buffer = self.port.read(99)\n-            except weewx.WeeWxIOError, e:\n-                syslog.syslog(syslog.LOG_ERR, \"vantage: LOOP #%d; read error. Try #%d\" % (loop, ntries))\n-                syslog.syslog(syslog.LOG_ERR, \"   ****  %s\" % e)\n-                ntries += 1\n-                continue\n+        _readloop = True\n+        while _readloop:\n+            # Request N packets:\n+            self.port.send_data(\"LOOP %d\\n\" % N)\n \n-            if crc16(_buffer):\n-                syslog.syslog(syslog.LOG_ERR,\n-                              \"vantage: LOOP #%d; CRC error. Try #%d\" % (loop, ntries))\n-                ntries += 1\n-                continue\n-            # ... decode it\n-            loop_packet = self._unpackLoopPacket(_buffer[:95])\n-            # Yield it\n-            yield loop_packet\n             ntries = 1\n \n+            for loop in range(N):","path":"bin/weewx/drivers/vantage.py","position":240,"original_position":240,"commit_id":"35fafba390122e02e85496c87a9ab02115c4cf53","original_commit_id":"35fafba390122e02e85496c87a9ab02115c4cf53","user":{"login":"tkeffer","id":3321259,"avatar_url":"https://avatars.githubusercontent.com/u/3321259?v=3","gravatar_id":"","url":"https://api.github.com/users/tkeffer","html_url":"https://github.com/tkeffer","followers_url":"https://api.github.com/users/tkeffer/followers","following_url":"https://api.github.com/users/tkeffer/following{/other_user}","gists_url":"https://api.github.com/users/tkeffer/gists{/gist_id}","starred_url":"https://api.github.com/users/tkeffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkeffer/subscriptions","organizations_url":"https://api.github.com/users/tkeffer/orgs","repos_url":"https://api.github.com/users/tkeffer/repos","events_url":"https://api.github.com/users/tkeffer/events{/privacy}","received_events_url":"https://api.github.com/users/tkeffer/received_events","type":"User","site_admin":false},"body":"Here is where the design gets complicated as the result of your earlier decision to allow read() to return something other than the number of characters requested.","created_at":"2016-03-04T12:56:59Z","updated_at":"2016-03-04T12:56:59Z","html_url":"https://github.com/weewx/weewx/pull/109#discussion_r55026263","pull_request_url":"https://api.github.com/repos/weewx/weewx/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/weewx/weewx/pulls/comments/55026263"},"html":{"href":"https://github.com/weewx/weewx/pull/109#discussion_r55026263"},"pull_request":{"href":"https://api.github.com/repos/weewx/weewx/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/weewx/weewx/pulls/109","id":61701247,"html_url":"https://github.com/weewx/weewx/pull/109","diff_url":"https://github.com/weewx/weewx/pull/109.diff","patch_url":"https://github.com/weewx/weewx/pull/109.patch","issue_url":"https://api.github.com/repos/weewx/weewx/issues/109","number":109,"state":"open","locked":false,"title":"Improved communication with both ip and serial data loggers","user":{"login":"lheijst","id":4925023,"avatar_url":"https://avatars.githubusercontent.com/u/4925023?v=3","gravatar_id":"","url":"https://api.github.com/users/lheijst","html_url":"https://github.com/lheijst","followers_url":"https://api.github.com/users/lheijst/followers","following_url":"https://api.github.com/users/lheijst/following{/other_user}","gists_url":"https://api.github.com/users/lheijst/gists{/gist_id}","starred_url":"https://api.github.com/users/lheijst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lheijst/subscriptions","organizations_url":"https://api.github.com/users/lheijst/orgs","repos_url":"https://api.github.com/users/lheijst/repos","events_url":"https://api.github.com/users/lheijst/events{/privacy}","received_events_url":"https://api.github.com/users/lheijst/received_events","type":"User","site_admin":false},"body":"Improved communication with both ip and serial data loggers","created_at":"2016-03-04T11:41:58Z","updated_at":"2016-03-04T12:56:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea8704734dfd1314e2cb340845fad2e2cb0f1d18","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/weewx/weewx/pulls/109/commits","review_comments_url":"https://api.github.com/repos/weewx/weewx/pulls/109/comments","review_comment_url":"https://api.github.com/repos/weewx/weewx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weewx/weewx/issues/109/comments","statuses_url":"https://api.github.com/repos/weewx/weewx/statuses/35fafba390122e02e85496c87a9ab02115c4cf53","head":{"label":"lheijst:master","ref":"master","sha":"35fafba390122e02e85496c87a9ab02115c4cf53","user":{"login":"lheijst","id":4925023,"avatar_url":"https://avatars.githubusercontent.com/u/4925023?v=3","gravatar_id":"","url":"https://api.github.com/users/lheijst","html_url":"https://github.com/lheijst","followers_url":"https://api.github.com/users/lheijst/followers","following_url":"https://api.github.com/users/lheijst/following{/other_user}","gists_url":"https://api.github.com/users/lheijst/gists{/gist_id}","starred_url":"https://api.github.com/users/lheijst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lheijst/subscriptions","organizations_url":"https://api.github.com/users/lheijst/orgs","repos_url":"https://api.github.com/users/lheijst/repos","events_url":"https://api.github.com/users/lheijst/events{/privacy}","received_events_url":"https://api.github.com/users/lheijst/received_events","type":"User","site_admin":false},"repo":{"id":53091860,"name":"weewx","full_name":"lheijst/weewx","owner":{"login":"lheijst","id":4925023,"avatar_url":"https://avatars.githubusercontent.com/u/4925023?v=3","gravatar_id":"","url":"https://api.github.com/users/lheijst","html_url":"https://github.com/lheijst","followers_url":"https://api.github.com/users/lheijst/followers","following_url":"https://api.github.com/users/lheijst/following{/other_user}","gists_url":"https://api.github.com/users/lheijst/gists{/gist_id}","starred_url":"https://api.github.com/users/lheijst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lheijst/subscriptions","organizations_url":"https://api.github.com/users/lheijst/orgs","repos_url":"https://api.github.com/users/lheijst/repos","events_url":"https://api.github.com/users/lheijst/events{/privacy}","received_events_url":"https://api.github.com/users/lheijst/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lheijst/weewx","description":"weewx code repository","fork":true,"url":"https://api.github.com/repos/lheijst/weewx","forks_url":"https://api.github.com/repos/lheijst/weewx/forks","keys_url":"https://api.github.com/repos/lheijst/weewx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lheijst/weewx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lheijst/weewx/teams","hooks_url":"https://api.github.com/repos/lheijst/weewx/hooks","issue_events_url":"https://api.github.com/repos/lheijst/weewx/issues/events{/number}","events_url":"https://api.github.com/repos/lheijst/weewx/events","assignees_url":"https://api.github.com/repos/lheijst/weewx/assignees{/user}","branches_url":"https://api.github.com/repos/lheijst/weewx/branches{/branch}","tags_url":"https://api.github.com/repos/lheijst/weewx/tags","blobs_url":"https://api.github.com/repos/lheijst/weewx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lheijst/weewx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lheijst/weewx/git/refs{/sha}","trees_url":"https://api.github.com/repos/lheijst/weewx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lheijst/weewx/statuses/{sha}","languages_url":"https://api.github.com/repos/lheijst/weewx/languages","stargazers_url":"https://api.github.com/repos/lheijst/weewx/stargazers","contributors_url":"https://api.github.com/repos/lheijst/weewx/contributors","subscribers_url":"https://api.github.com/repos/lheijst/weewx/subscribers","subscription_url":"https://api.github.com/repos/lheijst/weewx/subscription","commits_url":"https://api.github.com/repos/lheijst/weewx/commits{/sha}","git_commits_url":"https://api.github.com/repos/lheijst/weewx/git/commits{/sha}","comments_url":"https://api.github.com/repos/lheijst/weewx/comments{/number}","issue_comment_url":"https://api.github.com/repos/lheijst/weewx/issues/comments{/number}","contents_url":"https://api.github.com/repos/lheijst/weewx/contents/{+path}","compare_url":"https://api.github.com/repos/lheijst/weewx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lheijst/weewx/merges","archive_url":"https://api.github.com/repos/lheijst/weewx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lheijst/weewx/downloads","issues_url":"https://api.github.com/repos/lheijst/weewx/issues{/number}","pulls_url":"https://api.github.com/repos/lheijst/weewx/pulls{/number}","milestones_url":"https://api.github.com/repos/lheijst/weewx/milestones{/number}","notifications_url":"https://api.github.com/repos/lheijst/weewx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lheijst/weewx/labels{/name}","releases_url":"https://api.github.com/repos/lheijst/weewx/releases{/id}","deployments_url":"https://api.github.com/repos/lheijst/weewx/deployments","created_at":"2016-03-03T23:26:57Z","updated_at":"2016-03-03T23:26:59Z","pushed_at":"2016-03-04T11:38:52Z","git_url":"git://github.com/lheijst/weewx.git","ssh_url":"git@github.com:lheijst/weewx.git","clone_url":"https://github.com/lheijst/weewx.git","svn_url":"https://github.com/lheijst/weewx","homepage":"http://weewx.com","size":10278,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"weewx:master","ref":"master","sha":"5c9ffa0e3a4b9350151cc72abba79ddacbf382e8","user":{"login":"weewx","id":10202291,"avatar_url":"https://avatars.githubusercontent.com/u/10202291?v=3","gravatar_id":"","url":"https://api.github.com/users/weewx","html_url":"https://github.com/weewx","followers_url":"https://api.github.com/users/weewx/followers","following_url":"https://api.github.com/users/weewx/following{/other_user}","gists_url":"https://api.github.com/users/weewx/gists{/gist_id}","starred_url":"https://api.github.com/users/weewx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weewx/subscriptions","organizations_url":"https://api.github.com/users/weewx/orgs","repos_url":"https://api.github.com/users/weewx/repos","events_url":"https://api.github.com/users/weewx/events{/privacy}","received_events_url":"https://api.github.com/users/weewx/received_events","type":"Organization","site_admin":false},"repo":{"id":30899362,"name":"weewx","full_name":"weewx/weewx","owner":{"login":"weewx","id":10202291,"avatar_url":"https://avatars.githubusercontent.com/u/10202291?v=3","gravatar_id":"","url":"https://api.github.com/users/weewx","html_url":"https://github.com/weewx","followers_url":"https://api.github.com/users/weewx/followers","following_url":"https://api.github.com/users/weewx/following{/other_user}","gists_url":"https://api.github.com/users/weewx/gists{/gist_id}","starred_url":"https://api.github.com/users/weewx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weewx/subscriptions","organizations_url":"https://api.github.com/users/weewx/orgs","repos_url":"https://api.github.com/users/weewx/repos","events_url":"https://api.github.com/users/weewx/events{/privacy}","received_events_url":"https://api.github.com/users/weewx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weewx/weewx","description":"weewx code repository","fork":false,"url":"https://api.github.com/repos/weewx/weewx","forks_url":"https://api.github.com/repos/weewx/weewx/forks","keys_url":"https://api.github.com/repos/weewx/weewx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weewx/weewx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weewx/weewx/teams","hooks_url":"https://api.github.com/repos/weewx/weewx/hooks","issue_events_url":"https://api.github.com/repos/weewx/weewx/issues/events{/number}","events_url":"https://api.github.com/repos/weewx/weewx/events","assignees_url":"https://api.github.com/repos/weewx/weewx/assignees{/user}","branches_url":"https://api.github.com/repos/weewx/weewx/branches{/branch}","tags_url":"https://api.github.com/repos/weewx/weewx/tags","blobs_url":"https://api.github.com/repos/weewx/weewx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weewx/weewx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weewx/weewx/git/refs{/sha}","trees_url":"https://api.github.com/repos/weewx/weewx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weewx/weewx/statuses/{sha}","languages_url":"https://api.github.com/repos/weewx/weewx/languages","stargazers_url":"https://api.github.com/repos/weewx/weewx/stargazers","contributors_url":"https://api.github.com/repos/weewx/weewx/contributors","subscribers_url":"https://api.github.com/repos/weewx/weewx/subscribers","subscription_url":"https://api.github.com/repos/weewx/weewx/subscription","commits_url":"https://api.github.com/repos/weewx/weewx/commits{/sha}","git_commits_url":"https://api.github.com/repos/weewx/weewx/git/commits{/sha}","comments_url":"https://api.github.com/repos/weewx/weewx/comments{/number}","issue_comment_url":"https://api.github.com/repos/weewx/weewx/issues/comments{/number}","contents_url":"https://api.github.com/repos/weewx/weewx/contents/{+path}","compare_url":"https://api.github.com/repos/weewx/weewx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weewx/weewx/merges","archive_url":"https://api.github.com/repos/weewx/weewx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weewx/weewx/downloads","issues_url":"https://api.github.com/repos/weewx/weewx/issues{/number}","pulls_url":"https://api.github.com/repos/weewx/weewx/pulls{/number}","milestones_url":"https://api.github.com/repos/weewx/weewx/milestones{/number}","notifications_url":"https://api.github.com/repos/weewx/weewx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weewx/weewx/labels{/name}","releases_url":"https://api.github.com/repos/weewx/weewx/releases{/id}","deployments_url":"https://api.github.com/repos/weewx/weewx/deployments","created_at":"2015-02-17T02:32:29Z","updated_at":"2016-02-29T21:32:58Z","pushed_at":"2016-03-04T11:41:58Z","git_url":"git://github.com/weewx/weewx.git","ssh_url":"git@github.com:weewx/weewx.git","clone_url":"https://github.com/weewx/weewx.git","svn_url":"https://github.com/weewx/weewx","homepage":"http://weewx.com","size":12294,"stargazers_count":102,"watchers_count":102,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":31,"forks":51,"open_issues":31,"watchers":102,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weewx/weewx/pulls/109"},"html":{"href":"https://github.com/weewx/weewx/pull/109"},"issue":{"href":"https://api.github.com/repos/weewx/weewx/issues/109"},"comments":{"href":"https://api.github.com/repos/weewx/weewx/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/weewx/weewx/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/weewx/weewx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weewx/weewx/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/weewx/weewx/statuses/35fafba390122e02e85496c87a9ab02115c4cf53"}}}}