Skip to content

Commit

Permalink
Make invalid data detection a bit less fussy
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Easterbrook <jim@jim-easterbrook.me.uk>
  • Loading branch information
jim-easterbrook committed Jul 1, 2015
1 parent c4a64b5 commit bf85c08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/pywws/LogData.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ def catchup(self, last_date, last_ptr):
duplicates.append(last_date)
saved_date = self.raw_data.before(saved_date)
saved_ptr = self.ws.dec_ptr(saved_ptr)
if data['delay'] is None or data['delay'] > 30:
if (data['delay'] is None or
data['delay'] > max(fixed_block['read_period'] * 2, 35)):
self.logger.error('invalid data at %04x, %s',
last_ptr, last_date.isoformat(' '))
last_date -= timedelta(minutes=fixed_block['read_period'])
Expand Down
6 changes: 3 additions & 3 deletions src/pywws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '15.06.0.dev1301'
_release = '1301'
_commit = '0c54680'
__version__ = '15.07.0.dev1302'
_release = '1302'
_commit = 'c4a64b5'

0 comments on commit bf85c08

Please sign in to comment.