Skip to content

Commit a9ffcc9

Browse files
committed
Handle unicode when converting boolean
1 parent 124ec36 commit a9ffcc9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

operator/src/main/resources/scripts/model_wdt_mii_filter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def isAdministrationPortEnabledForServer(server, model):
446446
else:
447447
administrationPortEnabled = isAdministrationPortEnabledForDomain(model)
448448

449-
if isinstance(administrationPortEnabled, str):
449+
if isinstance(administrationPortEnabled, str) or isinstance(administrationPortEnabled, unicode):
450450
return Boolean.valueOf(administrationPortEnabled)
451451
else:
452452
return administrationPortEnabled
@@ -462,7 +462,7 @@ def isAdministrationPortEnabledForDomain(model):
462462
# Starting with 14.1.2.0, the domain's AdministrationPortEnabled default is derived from the domain's SecureMode
463463
administrationPortEnabled = isSecureModeEnabledForDomain(model)
464464

465-
if isinstance(administrationPortEnabled, str):
465+
if isinstance(administrationPortEnabled, str) or isinstance(administrationPortEnabled, unicode):
466466
return Boolean.valueOf(administrationPortEnabled)
467467
else:
468468
return administrationPortEnabled
@@ -487,7 +487,7 @@ def isSecureModeEnabledForDomain(model):
487487
is_production_mode_enabled = topology['ProductionModeEnabled']
488488
secureModeEnabled = is_production_mode_enabled and not env.wlsVersionEarlierThan("14.1.2.0")
489489

490-
if isinstance(secureModeEnabled, str):
490+
if isinstance(secureModeEnabled, str) or isinstance(secureModeEnabled, unicode):
491491
return Boolean.valueOf(secureModeEnabled)
492492
else:
493493
return secureModeEnabled

0 commit comments

Comments
 (0)