Deepsource Job: e417c302 #13

Merged
luketainton merged 2 commits from ds/e417c302 into main 2022-07-10 16:07:03 +02:00
2 changed files with 6 additions and 5 deletions
Showing only changes of commit 5fbcb5e89b - Show all commits

View File

@ -44,13 +44,13 @@ def main():
as_number = get_autonomous_system_number(ip_info.get("as"))
# Assemble list for table generation
country = ip_info.get("country")
region = ip_info.get("regionName")
city = ip_info.get("city")
table_data = [
["IP Address", ip_info.get("query")],
["Organization", ip_info.get("org")],
[
"Location",
f"{ip_info.get('country')}/{ip_info.get('regionName')}/{ip_info.get('city')}",
],
["Location", f"{country}/{region}/{city}"],
["Timezone", ip_info.get("timezone")],
["Internet Service Provider", ip_info.get("isp")],
["Autonomous System", as_number],

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3
"""MODULE: Provides functions that ensure an IP address is available to query the APIs for."""
"""MODULE: Provides functions that ensure an IP address is
available to query the APIs for."""
import socket
import ipaddress