From e5c03665e9f91f5f0c3a62922c0d5b1349d2c563 Mon Sep 17 00:00:00 2001 From: Tom Hendrikx Date: Tue, 18 Oct 2016 05:23:55 +0200 Subject: [PATCH] Fixes (#8) * Fix tests that fail Solves #5 * FIx syntax errors --- Milter/utils.py | 4 ++-- milter-nomix.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Milter/utils.py b/Milter/utils.py index 9d90206..9c518c3 100644 --- a/Milter/utils.py +++ b/Milter/utils.py @@ -70,7 +70,7 @@ def iniplist(ipaddr,iplist): True >>> iniplist('4.2.2.2',['b.resolvers.Level3.net']) True - >>> iniplist('2607:f8b0:4004:801::',['google.com/40']) + >>> iniplist('2606:2800:220:1:248:1893:25c8:1946',['example.com/64']) True >>> iniplist('4.2.2.2',['nothing.example.com']) False @@ -135,7 +135,7 @@ def parseaddr(t): >>> parseaddr('Real Name ((comment)) ') ('Real Name (comment)', 'addr...@example.com') >>> parseaddr('a(WRONG)@b') - ('WRONG', 'a@b') + ('WRONG WRONG', 'a@b') """ #return email.utils.parseaddr(t) res = email.utils.parseaddr(t) diff --git a/milter-nomix.py b/milter-nomix.py index bde0e43..671c54f 100644 --- a/milter-nomix.py +++ b/milter-nomix.py @@ -14,7 +14,7 @@ internal_tlds = ["corp", "personal"] # True if internal, False otherwise def is_internal(hostname): components = hostname.split(".") - return components.pop() in internal_tlds: + return components.pop() in internal_tlds # Determine if internal and external hosts are mixed based on a list # of hostnames