When issuing: location.py list-networks-by-cc XX
I get this error: for n in db.search_networks(country_code=country_code, family=ns.family): TypeError: 'country_code' is an invalid keyword argument for this function
But this works better: @@ -506,7 +506,7 @@ f = writer(sys.stdout, prefix=country_code)
# Print all matching networks - for n in db.search_networks(country_code=country_code, family=ns.family): + for n in db.search_networks(country_codes=[country_code.upper()], family=ns.family): f.write(n)
---
with the added bonus that I can do 'no' or 'NO'.
Hello,
On 1 Apr 2021, at 12:36, Gisle Vanem gisle.vanem@gmail.com wrote:
When issuing: location.py list-networks-by-cc XX
I get this error: for n in db.search_networks(country_code=country_code, family=ns.family): TypeError: 'country_code' is an invalid keyword argument for this function
But this works better: @@ -506,7 +506,7 @@ f = writer(sys.stdout, prefix=country_code)
# Print all matching networks
- for n in db.search_networks(country_code=country_code, family=ns.family):
- for n in db.search_networks(country_codes=[country_code.upper()], family=ns.family): f.write(n)
with the added bonus that I can do 'no' or 'NO'.
“no” is not a valid country code. “NO” is.
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
-Michael
-- --gv