aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornico <nico@magicbroccoli.de>2019-05-30 02:35:23 +0200
committernico <nico@magicbroccoli.de>2019-05-30 02:35:23 +0200
commit0d9f4147b08be59e2f6dc98efce24942985a590b (patch)
tree17825be8023ed4f5ee7d77097937005314f169db
parent6b2bf0719324856a0bbacb9b47dea88a7b9199d1 (diff)
unnecessary else
* remove unnecessary else clause
-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__":