@@ -885,14 +885,21 @@ def generateAndValidate(self):
885
885
#
886
886
versionPath = os .path .join (self .env .CUSTOM_SITCFG_PATH ,"version.txt" )
887
887
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" )
889
889
else :
890
890
version = self .env .readFile (versionPath ).strip ()
891
891
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." )
893
897
894
898
for the_file in os .listdir (self .env .CUSTOM_SITCFG_PATH ):
895
899
900
+ if the_file == "version.txt" :
901
+ continue
902
+
896
903
the_file_path = os .path .join (self .env .CUSTOM_SITCFG_PATH , the_file )
897
904
898
905
if not os .path .isfile (the_file_path ):
@@ -902,7 +909,7 @@ def generateAndValidate(self):
902
909
903
910
# check if file name corresponds with config.xml or a module
904
911
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" :
906
913
self .env .addError ("Error, custom sit config override file '" + the_file + "'"
907
914
+ " is not named 'config.xml' or has no matching system resource"
908
915
+ " module. Custom sit config files must be named 'config.xml'"
@@ -927,8 +934,6 @@ def generateAndValidate(self):
927
934
928
935
if the_file == 'config.xml' :
929
936
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'
932
937
else :
933
938
genfile += self .moduleMap [the_file ]
934
939
0 commit comments