@@ -502,18 +502,18 @@ def tokenize_path(self, path):
502502 cwd = path_utils .fixup_path (os .path .dirname (os .path .abspath (__file__ )))
503503
504504 # decide later what is required to be in context home for appropriate exception prevention
505- if self . get_wl_home () and my_path . startswith ( self . get_wl_home ()):
506- result = my_path . replace ( self . get_wl_home (), self . __WL_HOME_TOKEN )
507- elif self .get_domain_home () and my_path .startswith (self .get_domain_home ()):
508- result = my_path .replace (self .get_domain_home (), self .__DOMAIN_HOME_TOKEN )
509- elif self .get_oracle_home () and my_path .startswith (self .get_oracle_home ()):
510- result = my_path .replace (self .get_oracle_home (), self .__ORACLE_HOME_TOKEN )
511- elif my_path .startswith (cwd ):
512- result = my_path .replace (cwd , self .__CURRENT_DIRECTORY_TOKEN )
513- elif my_path .startswith (tmp_dir ):
514- result = my_path .replace (tmp_dir , self .__TEMP_DIRECTORY_TOKEN )
515- else :
516- result = my_path
505+ result = my_path
506+ if my_path :
507+ if self .get_wl_home () and my_path .startswith (self .get_wl_home ()):
508+ result = my_path .replace (self .get_wl_home (), self .__WL_HOME_TOKEN )
509+ elif self .get_domain_home () and my_path .startswith (self .get_domain_home ()):
510+ result = my_path .replace (self .get_domain_home (), self .__DOMAIN_HOME_TOKEN )
511+ elif self . get_oracle_home () and my_path .startswith (self . get_oracle_home () ):
512+ result = my_path .replace (self . get_oracle_home () , self .__ORACLE_HOME_TOKEN )
513+ elif my_path .startswith (cwd ):
514+ result = my_path .replace (cwd , self .__CURRENT_DIRECTORY_TOKEN )
515+ elif my_path . startswith ( tmp_dir ) :
516+ result = my_path . replace ( tmp_dir , self . __TEMP_DIRECTORY_TOKEN )
517517
518518 return result
519519
0 commit comments