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

Commit 5ba8aad

Browse files
committed
messages to stderr only with verbose=True
1 parent 6d56e87 commit 5ba8aad

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

whois/_0_init_tld.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,19 @@ def filterTldToSupportedPattern(
2929
# we have max 2 levels so first check if the last 2 are in our list
3030
tld = f"{d[-2]}.{d[-1]}"
3131
if tld in ZZ:
32-
print(f"we have {tld}", file=sys.stderr)
32+
if verbose:
33+
print(f"we have {tld}", file=sys.stderr)
3334
return tld
3435

3536
# if not check if the last item we have
3637
tld = f"{d[-1]}"
3738
if tld in ZZ:
38-
print(f"we have {tld}", file=sys.stderr)
39+
if verbose:
40+
print(f"we have {tld}", file=sys.stderr)
3941
return tld
4042

41-
print(f"we DONT have {tld}", file=sys.stderr)
43+
if verbose:
44+
print(f"we DONT have {tld}", file=sys.stderr)
4245

4346
# if not fail
4447
a = f"The TLD {tld} is currently not supported by this package."

0 commit comments

Comments
 (0)