Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #110 from shsmith/fix-105
Browse files Browse the repository at this point in the history
fix issue #105 Thread Exception When building database
  • Loading branch information
ThomasV committed Jul 19, 2015
2 parents 88a6531 + 6f30dcb commit 11c8253
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/blockchain_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,18 @@ def bitcoind(self, method, params=[]):
while True:
try:
respdata = urllib.urlopen(self.bitcoind_url, postdata).read()
except:
print_log("cannot reach bitcoind...")
except BaseException as e:
print_log("cannot reach bitcoind...", str(e))
self.wait_on_bitcoind()
else:
r = loads(respdata)
if r['error'] is not None:
if r['error'].get('code') == -28:
print_log("bitcoind still warming up...")
self.wait_on_bitcoind()
continue
raise BaseException(r['error'])
else:
print_log("bitcoind error...", r['error'])
self.wait_on_bitcoind()
continue
break
return r.get('result')

Expand Down

0 comments on commit 11c8253

Please sign in to comment.