explicitly localize gfe/vcmodule/vtec python files

This commit is contained in:
mjames-upc 2016-06-06 13:33:20 -05:00
parent 59918c5fe4
commit f31292846c
2 changed files with 24 additions and 3 deletions

View file

@ -148,6 +148,7 @@ import com.raytheon.viz.gfe.types.MutableInteger;
* 10/30/2014 #3775 randerso Changed to createMutableDb before getting initial database inventory
* 01/13/2015 #3955 randerso Changed getProductDatabase() to return mutableDb for EditTopo
* 03/12/2015 #4246 randerso Changes to support VCModules at base, site, and user levels
* 06/06/2016 mjames@ucar Force localization of GFE/vcmodule/vtec Python files
* </pre>
*
* @author chammack
@ -3088,7 +3089,7 @@ public class ParmManager implements IParmManager, IMessageClient {
public ParmID fromExpression(String expression) {
return new ABVParmID(this).parse(expression);
}
/**
* @return
*/
@ -3107,7 +3108,7 @@ public class ParmManager implements IParmManager, IMessageClient {
for (LocalizationContext context : contexts) {
LocalizationFile[] files = pathMgr.listFiles(context,
FileUtil.join("gfe", "vcmodule"), new String[] { "py" },
false, true);
true, true);
for (LocalizationFile lf : files) {
try {
String modName = lf.getFile(false).getName()
@ -3119,6 +3120,26 @@ public class ParmManager implements IParmManager, IMessageClient {
e);
}
}
files = pathMgr.listFiles(context, FileUtil.join(
"python"), new String[] { "py" },
true, true);
for (LocalizationFile lf : files) {
try {
lf.getFile(true);
} catch (LocalizationException e) {
statusHandler.error("Error getting local file " + lf, e);
}
}
files = pathMgr.listFiles(context, FileUtil.join(
"vtec"), new String[] { "py" },
true, true);
for (LocalizationFile lf : files) {
try {
lf.getFile(true);
} catch (LocalizationException e) {
statusHandler.error("Error getting local file " + lf, e);
}
}
}
List<VCModule> definitions = new ArrayList<VCModule>(modMap.size());

View file

@ -367,7 +367,7 @@ public class GfePyIncludeUtil extends PythonIncludePathUtil {
String userDir = getPath(PATH_MANAGER.getContext(
LocalizationType.COMMON_STATIC, LocalizationLevel.USER),
VCMODULES);
return PyUtil.buildJepIncludePath(userDir, siteDir, baseDir);
return PyUtil.buildJepIncludePath(userDir, siteDir, baseDir, "/awips2/python/lib/python2.7/site-packages/gfe");
}
public static String getVCModUtilsIncludePath() {