From 3fd055fe1008ec7f0525f8480243d7d1eeff4ef7 Mon Sep 17 00:00:00 2001 From: moecki <111915936+only-dev-time@users.noreply.github.com> Date: Sat, 5 Oct 2024 23:02:23 +0200 Subject: [PATCH] Fix TypeError in BlockQueue.push() #341 (#342) * fix TypeError #341 * use f-string to display fork --- hive/steem/block/stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hive/steem/block/stream.py b/hive/steem/block/stream.py index 2b640bae1..17ec1f382 100644 --- a/hive/steem/block/stream.py +++ b/hive/steem/block/stream.py @@ -35,11 +35,11 @@ def push(self, block): next_hash = block['block_id'] next_prev = block['previous'] if self._prev != next_prev: - fork = "%s--> %s->%s" % (self._prev, next_prev, next_hash) + fork = f"{self._prev}--> {next_prev}->{next_hash}" if self._queue: # if using max_size>0, fork might be in buffer only buff = self.size() alert = "NOTIFYALERT " if buff < self._max_size else "" - raise MicroForkException("%squeue:%d %s" % (alert, fork, buff)) + raise MicroForkException(f"{alert}queue:{buff} {fork}") raise ForkException("NOTIFYALERT fork " + fork) self._prev = next_hash