aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmain.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/main.py b/main.py
index d6ed2d3..efb3701 100755
--- a/main.py
+++ b/main.py
@@ -260,16 +260,15 @@ class AbuseReport:
# return list sorted by priority and weight
return sorted(results, key=lambda i: (i['priority'], i["weight"]))
- else:
- # prevent empty info when srv records are not present
- info = dict()
+ # prevent empty info when srv records are not present
+ info = dict()
- # gather necessary info from srv records
- info["host"] = domain
- info["ip"] = [ip.address for ip in dns.query(info["host"], "A")]
- results.append(info)
+ # gather necessary info from srv records
+ info["host"] = domain
+ info["ip"] = [ip.address for ip in dns.query(info["host"], "A")]
+ results.append(info)
- return results
+ return results
if __name__ == "__main__":