diff options
author | nico <nico@magicbroccoli.de> | 2019-05-30 02:35:23 +0200 |
---|---|---|
committer | nico <nico@magicbroccoli.de> | 2019-05-30 02:35:23 +0200 |
commit | 0d9f4147b08be59e2f6dc98efce24942985a590b (patch) | |
tree | 17825be8023ed4f5ee7d77097937005314f169db | |
parent | 6b2bf0719324856a0bbacb9b47dea88a7b9199d1 (diff) |
unnecessary else
* remove unnecessary else clause
-rwxr-xr-x | main.py | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -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__": |