From a08e96304bff440d1c1131fc253532bcfa7c5873 Mon Sep 17 00:00:00 2001 From: avarchenko Date: Fri, 17 Mar 2023 18:26:44 +0700 Subject: [PATCH] replace del() with dict.pop(_, None) to avoid raising KeyError --- qsh/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qsh/__init__.py b/qsh/__init__.py index 936ebd7..defd282 100644 --- a/qsh/__init__.py +++ b/qsh/__init__.py @@ -427,7 +427,7 @@ def read_quotes_data(self): volume = self.read_leb128() if volume == 0: - del self.quotes_dict[self.quotes_last_price] + self.quotes_dict.pop(self.quotes_last_price, None) else: self.quotes_dict[self.quotes_last_price] = volume