Skip to content

Commit 3c99882

Browse files
committed
fixed logic for json loading
1 parent c6b3083 commit 3c99882

File tree

2 files changed

+114
-111
lines changed

2 files changed

+114
-111
lines changed

src/authV2/azext_authV2/custom.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ def update_auth_settings_v2(cmd, resource_group_name, name, set_string=None, ena
161161
existing_auth["globalValidation"] = {}
162162
try:
163163
parsed = json.loads(excluded_paths)
164-
excluded_paths_list = parsed if isinstance(parsed, list) else excluded_paths.split(",")
164+
if isinstance(parsed, list):
165+
excluded_paths_list = parsed
166+
else:
167+
excluded_paths_list = [parsed] if parsed else []
165168
except json.JSONDecodeError:
166169
excluded_paths_list = excluded_paths.split(",")
167170

0 commit comments

Comments
 (0)