From 4ebd821395b4f452b9419400efd6894788e32b89 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Thu, 21 Nov 2013 07:12:44 +0100 Subject: [PATCH] Remove surrounding whitespace in registrant data --- pythonwhois/parse.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index ea057ed..513d46f 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -395,8 +395,7 @@ def parse_registrants(data): for obj in (registrant, tech_contact, billing_contact, admin_contact): if obj is not None: for key in obj.keys(): - #obj[key] = obj[key].strip("\r") - if obj[key] is None or obj[key] == "": + if obj[key] is None or obj[key].strip() == "": # Just chomp all surrounding whitespace del obj[key] if "phone_ext" in obj: if "phone" in obj: