Exemplo n.º 1
0
 def find_and_load(path, content):
     try:
         config_name = script_configs.read_name(path, content)
         if config_name == name:
             return script_configs.from_json(path, content, os_utils.is_pty_supported())
     except:
         LOGGER.exception('Could not load script config: ' + path)
Exemplo n.º 2
0
def _load_script_config(path, content_or_json_dict):
    if isinstance(content_or_json_dict, str):
        json_object = json.loads(content_or_json_dict)
    else:
        json_object = content_or_json_dict
    return script_configs.from_json(path, json_object,
                                    os_utils.is_pty_supported())
Exemplo n.º 3
0
 def find_and_load(path, content):
     try:
         config_name = script_configs.read_name(path, content)
         if config_name == name:
             return script_configs.from_json(path, content, pty_supported)
     except:
         logger = logging.getLogger("scriptServer")
         logger.exception("Could not load script config: " + path)