def get_block(self, block_hash):
    if not TEST_MODE:
      return self.bitcoind_get_block(block_hash)
    else:
      # Temporary solution before blockchain.info will fix their API
      not_proper_data = safe_nonbitcoind_blockchain_getblock(block_hash)

      max_height = self.blockchain_server.getblockcount()

      proper_data = {}
      try:
        proper_data['hash'] = not_proper_data['hash']
      except:
        logging.exception(not_proper_data % 'problematic blockchain data: %r')

      proper_data['height'] = not_proper_data['height']
      proper_data['size'] = not_proper_data['size']
      proper_data['merkleroot'] = not_proper_data['mrkl_root']
      proper_data['confirmations'] = max_height - proper_data['height'] + 1
      proper_data['version'] = not_proper_data['ver']
      proper_data['time'] = not_proper_data['time']
      proper_data['nonce'] = not_proper_data['nonce']
      proper_data['bits'] = not_proper_data['bits']
      proper_data['previousblockhash'] = not_proper_data['prev_block']
      proper_data['tx'] = [tx['hash'] for tx in not_proper_data['tx']]
      return proper_data
dataset/ETHPy150Open orisi/orisi/src/shared/bitcoind_client/bitcoinclient.py/BitcoinClient.get_block/swapped operands of `%`