Fix for a defect described here: GSA/inventory-app#955 (comment)
In the GSA/inventory-app repository, inckanext/datagov_inventory/dcat/dcat_converter.py, lines 250-255:
if dry_run:
click.echo("Dry run complete.")
elif results["error"] is False:
click.echo("Could not convert.")
else:
export_converted_catalog(converted_catalog, output_dir)
results starts as {"error": False, ...}. The only writes to results["error"] are the two except handlers, both after line 250, so if either fired we'd never reach :252. It's provably False there.
Effect: every non-dry-run invocation takes the elif. No catalog.json is written, "Could not convert." prints on success, and the command still exits 0, reporting conversion_successful: True whenever every dataset validated. export_converted_catalog is unreachable.
Fix for a defect described here: GSA/inventory-app#955 (comment)
In the GSA/inventory-app repository, in
ckanext/datagov_inventory/dcat/dcat_converter.py, lines 250-255:resultsstarts as{"error": False, ...}. The only writes toresults["error"]are the twoexcepthandlers, both after line 250, so if either fired we'd never reach:252. It's provablyFalsethere.Effect: every non-dry-run invocation takes the
elif. Nocatalog.jsonis written, "Could not convert." prints on success, and the command still exits 0, reportingconversion_successful: Truewhenever every dataset validated.export_converted_catalogis unreachable.