Skip to content

Commit

Permalink
#5: Fixed few bugs in place detector.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bystroushaak committed Jul 19, 2015
1 parent 7067013 commit e284535
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/wa_kat/analyzers/place_detector.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ def _get_whois_tags(ip_address):
# parse address tags
address_list = []
for net in nets:
if "address" not in net:
address = net.get("address", None)
if not address:
continue

address = net["address"]

# filter company name
if "description" in net:
if "description" in net and net["description"]:
address = address.replace(net["description"], "").strip()

if "\n" in address:
address = ", ".join(address.splitlines())

address_list.append(address)

return [
Expand Down

0 comments on commit e284535

Please sign in to comment.