From ebf25f719a6baacfaedf843e5f372a836f310fdc Mon Sep 17 00:00:00 2001 From: samitab Date: Wed, 1 May 2024 23:07:24 +1000 Subject: [PATCH] [ignore] fixed new sanity issue with typecheck --- .github/workflows/galaxy-importer.cfg | 3 +-- plugins/module_utils/mso.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/galaxy-importer.cfg b/.github/workflows/galaxy-importer.cfg index 8ec2cf0c..7208e7c1 100644 --- a/.github/workflows/galaxy-importer.cfg +++ b/.github/workflows/galaxy-importer.cfg @@ -6,5 +6,4 @@ RUN_ANSIBLE_LINT = True RUN_ANSIBLE_TEST = False ANSIBLE_TEST_LOCAL_IMAGE = False LOCAL_IMAGE_DOCKER = False -INFRA_OSD = False -CHECK_CHANGELOG = False \ No newline at end of file +INFRA_OSD = False \ No newline at end of file diff --git a/plugins/module_utils/mso.py b/plugins/module_utils/mso.py index 0f346d79..71cb6596 100644 --- a/plugins/module_utils/mso.py +++ b/plugins/module_utils/mso.py @@ -72,7 +72,7 @@ def issubset(subset, superset): return False # Item has different types in subset and superset - if type(superset.get(key)) != type(value): + if not isinstance(superset.get(key), type(value)): return False # Compare if item values are subset @@ -849,7 +849,7 @@ def lookup_roles(self, roles, ignore_not_found_error=False): access_type = "readWrite" try: role = ast.literal_eval(role) - if type(role) is dict and "name" in role: + if isinstance(role, dict) and "name" in role: name = role.get("name") if role.get("access_type") == "read": access_type = "readOnly"