From 4b43f9f016f785cc7f4f02f60e39fdc8a0ca9e1b Mon Sep 17 00:00:00 2001 From: MVDW Date: Fri, 26 Jan 2024 11:30:49 +0100 Subject: [PATCH] Changed isinstance to callable in handle_one_request Implemented the suggestion from https://github.com/netom/pyicap/issues/43 --- pyicap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyicap.py b/pyicap.py index 08b2ab5..bf64694 100644 --- a/pyicap.py +++ b/pyicap.py @@ -515,7 +515,7 @@ def handle_one_request(self): raise ICAPError(404) method = getattr(self, mname) - if not isinstance(method, collections.Callable): + if not callable(method): raise ICAPError(404) method() self.wfile.flush()