From 3a23ccdef80a4462f7c80f5f5ab6e4a399905c2c Mon Sep 17 00:00:00 2001 From: Shutdown <40902872+ShutdownRepo@users.noreply.github.com> Date: Thu, 21 Sep 2023 20:18:13 +0200 Subject: [PATCH] Upgrading collections import --- tools/SMBFinger/odict.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/SMBFinger/odict.py b/tools/SMBFinger/odict.py index 107cb01..ed3aa88 100644 --- a/tools/SMBFinger/odict.py +++ b/tools/SMBFinger/odict.py @@ -3,7 +3,11 @@ try: from UserDict import DictMixin except ImportError: from collections import UserDict - from collections import MutableMapping as DictMixin + # https://stackoverflow.com/questions/70870041/cannot-import-name-mutablemapping-from-collections + if sys.version_info[:2] >= (3, 8): + from collections.abc import MutableMapping + else: + from collections import MutableMapping class OrderedDict(dict, DictMixin):