Skip to content

Commit c4a5ee1

Browse files
author
Vince Kraemer
committed
respond to comments from Tom
1 parent 40fd1ed commit c4a5ee1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -885,14 +885,21 @@ def generateAndValidate(self):
885885
#
886886
versionPath=os.path.join(self.env.CUSTOM_SITCFG_PATH,"version.txt")
887887
if not os.path.exists(versionPath):
888-
self.env.addError("Error, Required file, "+versionPath+", does not exist")
888+
self.env.addError("Error, Required file, '"+versionPath+"', does not exist")
889889
else:
890890
version=self.env.readFile(versionPath).strip()
891891
if not version == "2.0":
892-
self.env.addError("Error, "+versionPath+" does not have the value of '2.0'.")
892+
# truncate and ellipsify at 75 characters
893+
version = version[:75] + (version[75:] and '...')
894+
self.env.addError("Error, "+versionPath+" does not have the value of"
895+
+ " '2.0'. The current content: '" + version
896+
+ "' is not valid.")
893897

894898
for the_file in os.listdir(self.env.CUSTOM_SITCFG_PATH):
895899

900+
if the_file == "version.txt":
901+
continue
902+
896903
the_file_path = os.path.join(self.env.CUSTOM_SITCFG_PATH, the_file)
897904

898905
if not os.path.isfile(the_file_path):
@@ -902,7 +909,7 @@ def generateAndValidate(self):
902909

903910
# check if file name corresponds with config.xml or a module
904911

905-
if not self.moduleMap.has_key(the_file) and the_file != "config.xml" and the_file != "version.txt":
912+
if not self.moduleMap.has_key(the_file) and the_file != "config.xml":
906913
self.env.addError("Error, custom sit config override file '" + the_file + "'"
907914
+ " is not named 'config.xml' or has no matching system resource"
908915
+ " module. Custom sit config files must be named 'config.xml'"
@@ -927,8 +934,6 @@ def generateAndValidate(self):
927934

928935
if the_file == 'config.xml':
929936
genfile += self.env.CUSTOM_PREFIX_CFG + 'custom-situational-config.xml'
930-
elif the_file == 'version.txt':
931-
genfile += self.env.CUSTOM_PREFIX_CFG + 'version.txt'
932937
else:
933938
genfile += self.moduleMap[the_file]
934939

0 commit comments

Comments
 (0)