Skip to content

Commit d3d7dea

Browse files
authored
{AKS} Fix enum check in test (#29517)
1 parent 2956483 commit d3d7dea

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/azure-cli/azure/cli/command_modules/acs/base_decorator.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ def validate_decorator_mode(decorator_mode) -> bool:
2626
:return: bool
2727
"""
2828
is_valid_decorator_mode = False
29-
try:
29+
30+
if isinstance(decorator_mode, DecoratorMode):
3031
is_valid_decorator_mode = decorator_mode in DecoratorMode
31-
# will raise TypeError in Python >= 3.8
32-
except TypeError:
33-
pass
3432

3533
return is_valid_decorator_mode
3634

0 commit comments

Comments
 (0)