From f18444e17c04491c5e3c7efe8f4a0f2a367ccaff Mon Sep 17 00:00:00 2001 From: ZigaMr Date: Tue, 10 May 2022 01:06:21 +0200 Subject: [PATCH] Deleted import that was causing problems with logging --- listener.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/listener.py b/listener.py index 6431fa1..02736bb 100644 --- a/listener.py +++ b/listener.py @@ -24,7 +24,6 @@ from mev_inspect.queue.tasks import ( ) from mev_inspect.signal_handler import GracefulKiller from mev_inspect.utils import RPCType -from cli import convert_str_to_enum logging.basicConfig(filename="listener.log", filemode="a", level=logging.INFO) logger = logging.getLogger(__name__) @@ -32,6 +31,12 @@ logger = logging.getLogger(__name__) # lag to make sure the blocks we see are settled BLOCK_NUMBER_LAG = 5 +def convert_str_to_enum(type: str) -> RPCType: + if type == "parity": + return RPCType.parity + elif type == "geth": + return RPCType.geth + raise ValueError @coro async def run():