Skip to content

Commit 621adb5

Browse files
committed
Merge branch 'issue-#1466-wl-home-token' into 'main'
Ensure that WL_HOME token can be resolved for exit model context typedef See merge request weblogic-cloud/weblogic-deploy-tooling!1468
2 parents 0fdbe1a + 3ed209e commit 621adb5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/main/python/wlsdeploy/util/model_context.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, program_name, arg_map=None):
5656
self._model_config = model_config.get_model_config(self._program_name)
5757

5858
self._oracle_home = None
59-
self._wl_home = None
59+
self._wl_home = ""
6060
self._java_home = None
6161
self._domain_home = None
6262
self._domain_name = None
@@ -922,13 +922,13 @@ def tokenize_path(self, path):
922922
# decide later what is required to be in context home for appropriate exception prevention
923923
result = my_path
924924
if not string_utils.is_empty(my_path):
925-
if wl_home is not None and my_path.startswith(wl_home):
925+
if wl_home and my_path.startswith(wl_home):
926926
result = my_path.replace(wl_home, self.WL_HOME_TOKEN)
927-
elif domain_home is not None and my_path.startswith(domain_home):
927+
elif domain_home and my_path.startswith(domain_home):
928928
result = my_path.replace(domain_home, self.DOMAIN_HOME_TOKEN)
929-
elif oracle_home is not None and my_path.startswith(oracle_home):
929+
elif oracle_home and my_path.startswith(oracle_home):
930930
result = my_path.replace(oracle_home, self.ORACLE_HOME_TOKEN)
931-
elif java_home is not None and my_path.startswith(java_home):
931+
elif java_home and my_path.startswith(java_home):
932932
result = my_path.replace(java_home, self.JAVA_HOME_TOKEN)
933933
elif my_path.startswith(cwd):
934934
result = my_path.replace(cwd, self.CURRENT_DIRECTORY_TOKEN)

0 commit comments

Comments
 (0)