fix to use the new pycountry API

This commit is contained in:
Olivier MEDOC 2017-01-10 16:45:32 +01:00 committed by Olivier Medoc
parent 1950a2dc0e
commit 68ca20db8f

View file

@ -113,7 +113,7 @@ if __name__ == "__main__":
# IP allocation) # IP allocation)
if cc is not None and cc != "EU": if cc is not None and cc != "EU":
print hostl, asn, cc, \ print hostl, asn, cc, \
pycountry.countries.get(alpha2=cc).name pycountry.countries.get(alpha_2=cc).name
if cc == cc_critical: if cc == cc_critical:
to_print = 'Url;{};{};{};Detected {} {}'.format( to_print = 'Url;{};{};{};Detected {} {}'.format(
PST.p_source, PST.p_date, PST.p_name, PST.p_source, PST.p_date, PST.p_name,