Skip to content

Commit

Permalink
fix: referenced before assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
magicalne committed Apr 19, 2022
1 parent ff98cb2 commit 6907901
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions agent/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ def get_BlockDetail(self, block_hash):
convert_int(replay["block"]["raw"]["timestamp"]),
}
except:
logging.exception(
"Error get block detail, block hash: %s, res: %s", block_hash,
res)
logging.exception("Error get block detail, block hash: %s",
block_hash)
return {
"blocknumber": "-1",
"parent_block_hash": "-1",
Expand Down Expand Up @@ -137,9 +136,7 @@ def get_BlockDetailByNumber(self, number):
convert_int(replay["block"]["raw"]["timestamp"]),
}
except:
logging.error("Error get block detail by number: %d",
number,
exc_info=True)
logging.exception("Error get block detail by number: %d", number)
return {
"blocknumber": "-1",
"commit_transactions": "-1",
Expand Down

0 comments on commit 6907901

Please sign in to comment.