From 3ba38effc00c631d7b6d96d19a687452e8319cc2 Mon Sep 17 00:00:00 2001 From: larsyngvelundin <34173819+larsyngvelundin@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:42:28 +0100 Subject: [PATCH] 0.1b minor update --- version_history.txt | 5 +++++ web3_balancer/main.py | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 version_history.txt diff --git a/version_history.txt b/version_history.txt new file mode 100644 index 0000000..8d012b3 --- /dev/null +++ b/version_history.txt @@ -0,0 +1,5 @@ +## 0.1b +Added `TimeoutError` to the exceptions to be handled. + +## 0.1 +Initial version \ No newline at end of file diff --git a/web3_balancer/main.py b/web3_balancer/main.py index 8577b79..e512c1f 100644 --- a/web3_balancer/main.py +++ b/web3_balancer/main.py @@ -104,7 +104,10 @@ def _call_w3_func(self, func): val = eval(f"self.is_contract.{func}") else: val = eval(f"self._w3.{func}") - except (requests.exceptions.ConnectionError, requests.exceptions.ReadTimeout, requests.exceptions.HTTPError) as error: + except (requests.exceptions.ConnectionError, + requests.exceptions.ReadTimeout, + requests.exceptions.HTTPError, + TimeoutError) as error: self.error_count += 1 if (self.error_count > 1): raise Exception(