diff options
author | John Newbery <john@johnnewbery.com> | 2017-02-24 17:54:19 -0500 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-03-09 09:26:48 -0500 |
commit | ff190739be99a134df5e682c37ef255c51bc6128 (patch) | |
tree | 55ef5c7dff7bf4c9c150c75fb700f341739bd0fd /qa | |
parent | 2a9c7c74dc557a0a1d8ef11b783aa134a00fe484 (diff) |
Use logging in test_framework/blockstore.py
Diffstat (limited to 'qa')
-rw-r--r-- | qa/rpc-tests/test_framework/blockstore.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qa/rpc-tests/test_framework/blockstore.py b/qa/rpc-tests/test_framework/blockstore.py index 5280d18cdc..4cfd682bb5 100644 --- a/qa/rpc-tests/test_framework/blockstore.py +++ b/qa/rpc-tests/test_framework/blockstore.py @@ -8,6 +8,8 @@ from .mininode import * from io import BytesIO import dbm.dumb as dbmd +logger = logging.getLogger("TestFramework.blockstore") + class BlockStore(object): """BlockStore helper class. @@ -86,7 +88,7 @@ class BlockStore(object): try: self.blockDB[repr(block.sha256)] = bytes(block.serialize()) except TypeError as e: - print("Unexpected error: ", sys.exc_info()[0], e.args) + logger.exception("Unexpected error") self.currentBlock = block.sha256 self.headers_map[block.sha256] = CBlockHeader(block) @@ -156,7 +158,7 @@ class TxStore(object): try: self.txDB[repr(tx.sha256)] = bytes(tx.serialize()) except TypeError as e: - print("Unexpected error: ", sys.exc_info()[0], e.args) + logger.exception("Unexpected error") def get_transactions(self, inv): responses = [] |