Issue #1759: Prevent site-specific paths from getting stuck in IscScript's include path.
Change-Id: I8ce909536174192217f5ba228af24cca08796c7b Former-commit-id:cab1c849bf
[formerly 6ebf8b354145cac21458617b9bb4cdcbedeff7e7] Former-commit-id:3ccf091c44
This commit is contained in:
parent
c15635bccc
commit
88eed9bc17
1 changed files with 13 additions and 5 deletions
|
@ -48,6 +48,8 @@ import com.raytheon.uf.common.util.FileUtil;
|
|||
* Mar 11, 2013 dgilling Initial creation
|
||||
* May 22, 2013 #1759 dgilling Ensure addSitePath() also adds base
|
||||
* path.
|
||||
* May 31, 2013 #1759 dgilling Ensure any site-specific paths are
|
||||
* always removed post-execution.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -85,11 +87,17 @@ public class IscScript extends PythonScript {
|
|||
|
||||
public Object execute(String methodName, Map<String, Object> args,
|
||||
String siteId) throws JepException {
|
||||
addSiteSpecificInclude(siteId);
|
||||
Object retVal = super.execute(methodName, args);
|
||||
jep.eval("rollbackImporter.rollback()");
|
||||
removeSiteSpecificInclude(siteId);
|
||||
return retVal;
|
||||
try {
|
||||
addSiteSpecificInclude(siteId);
|
||||
Object retVal = super.execute(methodName, args);
|
||||
return retVal;
|
||||
} finally {
|
||||
// if we don't ensure these two modifications to the python include
|
||||
// path happen after every execution, site-specific paths can get
|
||||
// stuck if a JepException is thrown by the execute() method.
|
||||
jep.eval("rollbackImporter.rollback()");
|
||||
removeSiteSpecificInclude(siteId);
|
||||
}
|
||||
}
|
||||
|
||||
public String getScriptName() {
|
||||
|
|
Loading…
Add table
Reference in a new issue