+ flatnode_file=str(self.config.get_path('FLATNODE_FILE')),
+ tablespaces=dict(slim_data=self.config.TABLESPACE_OSM_DATA,
+ slim_index=self.config.TABLESPACE_OSM_INDEX,
+ main_data=self.config.TABLESPACE_PLACE_DATA,
+ main_index=self.config.TABLESPACE_PLACE_INDEX
+ )
+ )
+
+
+ def get_osm_file_list(self):
+ """ Return the --osm-file argument as a list of Paths or None
+ if no argument was given. The function also checks if the files
+ exist and raises a UsageError if one cannot be found.
+ """
+ if not self.osm_file:
+ return None
+
+ files = [Path(f) for f in self.osm_file]
+ for fname in files:
+ if not fname.is_file():
+ LOG.fatal("OSM file '%s' does not exist.", fname)
+ raise UsageError('Cannot access file.')