def process_model_directory(self, path): if path[0] == '%': pass elif os.path.isdir(path): # recursive search of ilimodels paths get_all_modeldir_in_path(path, self.process_local_ili_folder) else: self.download_repository(path)
def process_model_directory(self, path): if path[0] == "%": pass else: # download remote and local repositories self.download_repository(path) if os.path.isdir(path): # additional recursive search of paths containing ili files (without ilimodel.xml) get_all_modeldir_in_path(path, self.process_local_ili_folder)
def to_ili2db_args(self, with_modeldir=True): """ Create an ili2db command line argument string from this configuration """ args = list() if with_modeldir: if self.custom_model_directories_enabled and self.custom_model_directories: str_model_directories = [get_all_modeldir_in_path(path) for path in self.custom_model_directories.split(';')] str_model_directories = ';'.join(str_model_directories) args += ['--modeldir', str_model_directories] if self.debugging_enabled and self.logfile_path: args += ['--trace'] args += ['--log', self.logfile_path] return args