Changeset 13738


Ignore:
Timestamp:
2007-01-23T12:17:09+13:00 (15 years ago)
Author:
mdewsnip
Message:

Tidied up the loadArguments function in ScriptOptions in preparation for removing the code that gets/saves the script options in the configuration file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/ScriptOptions.java

    r13594 r13738  
    283283
    284284
    285     private Element loadArguments(String filename, String lang) {
    286     Element arguments_element = null;
    287     InputStream input_stream = null;
    288 
     285    private Element loadArguments(String filename, String lang)
     286    {
    289287    // Run the required program.
    290288    try {
    291289        Document document;
     290
    292291        if (Gatherer.isGsdlRemote) {
    293292        String script_output = RemoteGreenstoneServer.getScriptOptions(filename, "");
     
    316315        Runtime runtime = Runtime.getRuntime();
    317316        Process process = runtime.exec(args);
    318 
    319         input_stream = process.getErrorStream();
    320         document = XMLTools.parseXML(input_stream);
    321         }
    322 
    323         arguments_element = document.getDocumentElement();
     317        document = XMLTools.parseXML(process.getErrorStream());
     318        }
     319
     320        return document.getDocumentElement();
    324321    }
    325322    catch (Exception error) {
     
    327324        DebugStream.printStackTrace(error);
    328325    }
    329     return arguments_element;
    330     }
    331 
     326
     327    return null;
     328    }
    332329}
Note: See TracChangeset for help on using the changeset viewer.