sbng / mrt2mmdb

Convert a mrt file into a maxmind database file
1 stars 0 forks source link

MMDB file cannot be missing - error #9

Closed johnhtodd closed 3 weeks ago

johnhtodd commented 6 months ago

If the default MMDB file doesn't exist (I renamed it) then the script throws an error even if "--custom_lookup_only" is specified:

root@dev01:~/mrt/mrt2mmdb/mrt2mmdb# ./make_mmdb.py --mrt data/ams-20240327.mrt.gz --target ASN-Extended.mmdb --lookup_file ./data/asn_rir_org_country --custom_lookup_only --database_type bgp-table

error: unable to locate mrt/mmdb file

sbng commented 6 months ago

@johnhtodd Thanks for identifying this bug. I have refactor the filename argument logic into a more structure approach. Hopefully this will allow more cases and variation to be handled. I have also enhance the output to include filename of mmda, csv, mrt as well as target file. This should gives more visibility into the entire workflow.

89c513724886cc925e09d092b8ed599ba00ee2ad commit. Please verify. Thanks