forrestv, it is possible to catch erors in more elegant way?
Fragment of log:
2012-10-26 18:27:46.661441 Pool: 376GH/s Stale rate: 9.8% Expected time to block: 9.7 hours
2012-10-26 18:27:47.489866 > Error while calling merged getauxblock:
2012-10-26 18:27:47.490452 > Traceback (most recent call last):
2012-10-26 18:27:47.490728 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
2012-10-26 18:27:47.491193 > current.result = callback(current.result, *args, **kw)
2012-10-26 18:27:47.491493 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1095, in gotResult
2012-10-26 18:27:47.491694 > _inlineCallbacks(r, g, deferred)
2012-10-26 18:27:47.492124 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
2012-10-26 18:27:47.492684 > result = result.throwExceptionIntoGenerator(g)
2012-10-26 18:27:47.493071 > File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
2012-10-26 18:27:47.493683 > return g.throw(self.type, self.value, self.tb)
2012-10-26 18:27:47.494030 > --- ---
2012-10-26 18:27:47.494498 > File "/home/rav3n/p2pool/p2pool/util/deferral.py", line 41, in f
2012-10-26 18:27:47.494755 > result = yield func(*args, **kwargs)
2012-10-26 18:27:47.495327 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
2012-10-26 18:27:47.495597 > result = result.throwExceptionIntoGenerator(g)
2012-10-26 18:27:47.496006 > File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
2012-10-26 18:27:47.496226 > return g.throw(self.type, self.value, self.tb)
2012-10-26 18:27:47.496612 > File "/home/rav3n/p2pool/p2pool/util/jsonrpc.py", line 71, in callRemote
2012-10-26 18:27:47.496817 > raise Error_for_code(resp['error']['code'])(resp['error']['message'], resp['error'].get('data', None))
2012-10-26 18:27:47.497191 > p2pool.util.jsonrpc.NarrowError: -10 I0Coin is downloading blocks...
2012-10-26 18:27:47.566807 > Error while calling merged getauxblock:
2012-10-26 18:27:47.566949 > Traceback (most recent call last):
2012-10-26 18:27:47.566984 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
2012-10-26 18:27:47.567016 > current.result = callback(current.result, *args, **kw)
2012-10-26 18:27:47.567063 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1095, in gotResult
2012-10-26 18:27:47.567092 > _inlineCallbacks(r, g, deferred)
2012-10-26 18:27:47.567194 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
2012-10-26 18:27:47.567263 > result = result.throwExceptionIntoGenerator(g)
2012-10-26 18:27:47.567292 > File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
2012-10-26 18:27:47.567320 > return g.throw(self.type, self.value, self.tb)
2012-10-26 18:27:47.567346 > --- ---
2012-10-26 18:27:47.567371 > File "/home/rav3n/p2pool/p2pool/util/deferral.py", line 41, in f
2012-10-26 18:27:47.567397 > result = yield func(*args, **kwargs)
2012-10-26 18:27:47.567422 > File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
2012-10-26 18:27:47.567447 > result = result.throwExceptionIntoGenerator(g)
2012-10-26 18:27:47.567592 > File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
2012-10-26 18:27:47.567679 > return g.throw(self.type, self.value, self.tb)
2012-10-26 18:27:47.567707 > File "/home/rav3n/p2pool/p2pool/util/jsonrpc.py", line 71, in callRemote
2012-10-26 18:27:47.567779 > raise Error_for_code(resp['error']['code'])(resp['error']['message'], resp['error'].get('data', None))
2012-10-26 18:27:47.567809 > p2pool.util.jsonrpc.NarrowError: -10 I0Coin is downloading blocks...
2012-10-26 18:27:49.675252 P2Pool: 18454 shares in chain (18458 verified/18458 total) Peers: 11 (1 incoming)
In fact it can be one-liner:
2012-10-26 18:27:47.567809 > p2pool.util.jsonrpc.NarrowError: -10 I0Coin is downloading blocks...
Also it is printed 2 times one by one, getauxblock function is called second time immediately after failed try?