mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 00:07:14 +03:00
[1801] Check for files at output generation
Adds a check to see if the FDevID files exist to the output file generation process. If they don't generate a warning log entry and continue without them.
This commit is contained in:
parent
6292936646
commit
17e740d3ee
@ -1204,6 +1204,9 @@ def fixup(data: CAPIData) -> CAPIData: # noqa: C901, CCR001 # Can't be usefully
|
||||
if not commodity_map:
|
||||
# Lazily populate
|
||||
for f in ('commodity.csv', 'rare_commodity.csv'):
|
||||
if not os.path.isfile(config.respath_path / 'FDevIDs/' / f):
|
||||
logger.warning(f'FDevID file {f} not found! Generating output without these commodity name rewrites.')
|
||||
continue
|
||||
with open(config.respath_path / 'FDevIDs' / f, 'r') as csvfile:
|
||||
reader = csv.DictReader(csvfile)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user