Skip to content

Commit

Permalink
tools: fix for python3.10
Browse files Browse the repository at this point in the history
googleapis/google-auth-library-python#419

Signed-off-by: Huaqi <hqfang@nucleisys.com>
  • Loading branch information
fanghuaqi committed Jul 11, 2022
1 parent 7d93f59 commit 53c8ec8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/scripts/nsdk_cli/nsdk_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
print("Please install requried packages using: pip3 install -r %s" % (requirement_file))
sys.exit(1)

try:
from collections.abc import Mapping
except ImportError: # Python 2.7 compatibility
from collections import Mapping

SDK_GLOBAL_VARIABLES = {
"sdk_checktag": "Nuclei SDK Build Time:",
"sdk_check": True,
Expand Down Expand Up @@ -166,7 +171,7 @@ def dict_merge(dct, merge_dct):
"""
for k, v in merge_dct.items():
if (k in dct and isinstance(dct[k], dict)
and isinstance(merge_dct[k], collections.Mapping)):
and isinstance(merge_dct[k], Mapping)):
dict_merge(dct[k], merge_dct[k])
else:
dct[k] = merge_dct[k]
Expand Down

0 comments on commit 53c8ec8

Please sign in to comment.