pierky / arouteserver

A tool to automatically build (and test) feature-rich configurations for BGP route servers.
https://arouteserver.readthedocs.org/
GNU General Public License v3.0
284 stars 46 forks source link

registrobr: fix exception in https source handling #128

Closed liske closed 6 months ago

liske commented 6 months ago

We want to avoid to use ftp to download the registro.br db dump and prefer to use https instead. Switching the protocol in the configuration throws an exception in RegistroBRWhoisDBDump:

ERROR Can't decode Registro.br Whois DB raw file: 'str' object has no attribute 'decode' - The error occurred while loading the IRR data from https://ftp.registro.br/pub/numeracao/origin/nicbr-asn-blk-latest.txt. If the data was moved to a different location, it is possible to adjust the configuration by changing the value of 'filtering.irrdb.use_registrobr_bulk_whois_data.source' inside the general.yml file.

This patch fixes the handling of the requests.get() response.

Cheers from @dd-ix

pierky commented 6 months ago

Thanks @liske, I've merged the PR into master. The CI/CD pipeline is running now, if everything goes well, v1.21.6 will be out in about 1 hour with the fix.