Merged in kidmose/pywhois/feature/test-missing-keys (pull request #33)
test_parser.py: Fail on missing keys
--- a/whois/parser.py Thu Feb 15 15:00:18 2018 +0100
+++ b/whois/parser.py Thu Feb 15 15:32:45 2018 +0000
@@ -274,10 +274,22 @@
return WhoisIe(domain, text)
elif domain.endswith('.nz'):
return WhoisNz(domain, text)
+ elif domain.endswith('.space'):
+ return WhoisSpace(domain, text)
else:
return WhoisEntry(domain, text)
+class WhoisSpace(WhoisEntry):
+ """Whois parser for .space domains
+ """
+ def __init__(self, domain, text):
+ if 'No match for "' in text:
+ raise PywhoisError(text)
+ else:
+ WhoisEntry.__init__(self, domain, text)
+
+
class WhoisCom(WhoisEntry):
"""Whois parser for .com domains
"""