File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ def main(arguments):
314314 except Exception :
315315 pass
316316
317- if arguments [' INPUT_DIR' ] :
317+ if arguments [" INPUT_DIR" ] and os . path . isdir ( arguments [ "INPUT_DIR" ]) :
318318 # use --export to select the entities
319319 in_base = arguments ['INPUT_DIR' ]
320320 for entity in arguments ['--export' ]:
@@ -328,8 +328,13 @@ def main(arguments):
328328 max_hint = min (expected_count , limit or expected_count ),
329329 dry_run = dry_run )
330330 exporter .export ()
331- elif arguments ["<INPUT_FILE>" ]:
332- for in_file in arguments ["<INPUT_FILE>" ]:
331+ elif arguments ["<INPUT_FILE>" ] or os .path .isfile (arguments ["INPUT_DIR" ]):
332+ files = []
333+ if arguments ["<INPUT_FILE>" ]:
334+ files = arguments ["<INPUT_FILE>" ]
335+ else :
336+ files = [ arguments ["INPUT_DIR" ] ]
337+ for in_file in files :
333338 for entity in _exporters :
334339 # discogs files are named discogs_{date}_{entity}s.xml
335340 if f"_{ entity } " in in_file :
You can’t perform that action at this time.
0 commit comments