# HG changeset patch # User drewp@bigasterisk.com # Date 1339821289 0 # Node ID 9f774fd3c92630828d66fb25147f22cb2a82daca # Parent 24db623e209725414b72e30db624272dceba4451 don't break on a hovertime failur Ignore-this: 5fc6734a6f8f52c560583796acf31d6a diff -r 24db623e2097 -r 9f774fd3c926 light9/vidref/main.py --- a/light9/vidref/main.py Sat Jun 16 04:33:23 2012 +0000 +++ b/light9/vidref/main.py Sat Jun 16 04:34:49 2012 +0000 @@ -17,6 +17,7 @@ from light9 import networking from light9.vidref.replay import ReplayViews, songDir, takeDir, framerate from restkit.errors import ResourceNotFound +import http_parser.http log = logging.getLogger() @@ -54,8 +55,10 @@ pos['t'] = pos['t'] + (time.time() - self.positionFetchTime) else: try: + # todo: this is blocking for a long while if CC is + # down. Either make a tiny timeout, or go async r = self.curveCalc.get("hoverTime") - except ResourceNotFound: + except (ResourceNotFound, http_parser.http.NoMoreData, Exception): pass else: pos['hoverTime'] = json.loads(r.body_string())['hoverTime']