Skip to content
This repository was archived by the owner on Feb 3, 2024. It is now read-only.

Commit a7dfd1a

Browse files
authored
Merge pull request #265 from maarten-boot/development
registration of this domain is restricted as valid None reason
2 parents 678f9f6 + aa276d3 commit a7dfd1a

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

test2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ def testItem(d: str, printgetRawWhoisResult: bool = False):
207207

208208
print("\n", whois.get_last_raw_whois_data())
209209

210+
210211
def errorItem(d, e, what="Generic"):
211212
if what not in Failures:
212213
Failures[what] = {}

whois/_2_parse.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def handleShortResponse(
101101
"nameserver not found",
102102
"malformed request", # this means this domain is not in whois as it is on top of a registered domain
103103
"no match",
104+
"registration of this domain is restricted",
104105
]
105106

106107
for i in noneStrings:

whois/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def doUnsupportedTldAnyway(
187187
"Try": [],
188188
}
189189

190+
190191
def get_last_raw_whois_data():
191192
global LastWhois
192193
return LastWhois
@@ -225,7 +226,7 @@ def query(
225226
if the tld is unsupported, just try it anyway but return only the raw text.
226227
"""
227228
global LastWhois
228-
LastWhois["Try"] = [] # init on start of query
229+
LastWhois["Try"] = [] # init on start of query
229230

230231
assert isinstance(domain, str), Exception("`domain` - must be <str>")
231232
return_raw_text_for_unsupported_tld = bool(return_raw_text_for_unsupported_tld)

0 commit comments

Comments
 (0)