Mercurial > code > home > repos > light9
changeset 1131:32cae9be6c15
timeout error includes lag
Ignore-this: 551b168d487eb3dd6e9d00edd8f43a3e
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Fri, 13 Jun 2014 09:04:07 +0000 |
parents | 04d5f94be12b |
children | 02bd7c118cd8 |
files | light9/effecteval/effectloop.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/effecteval/effectloop.py Fri Jun 13 08:52:19 2014 +0000 +++ b/light9/effecteval/effectloop.py Fri Jun 13 09:04:07 2014 +0000 @@ -51,13 +51,13 @@ @inlineCallbacks def getSongTime(self): now = time.time() - - if now - self.requestTime > self.coastSecs: + old = now - self.requestTime + if old > self.coastSecs: try: response = json.loads((yield cyclone.httpclient.fetch( networking.musicPlayer.path('time'), timeout=.5)).body) - except TimeoutError as e: - log.warning("%r, using stale time", e) + except TimeoutError: + log.warning("TimeoutError: using stale time from %.1f ago", old) else: self.requestTime = now self.currentPlaying = response['playing']