Skip to content

Comments

Do not fail if whois.query returns None#115

Closed
bayandin wants to merge 1 commit intoelceef:masterfrom
bayandin:patch-1
Closed

Do not fail if whois.query returns None#115
bayandin wants to merge 1 commit intoelceef:masterfrom
bayandin:patch-1

Conversation

@bayandin
Copy link
Contributor

@bayandin bayandin commented Dec 9, 2020

This PR adds handling for None from whois.query (it looks like this is a legit behaviour https://github.com/DannyCork/python-whois/blob/0.9.7/whois/__init__.py#L73)

Originally, the error was caught in one of Homebrew CI runs:

==> /usr/local/Cellar/dnstwist/20201022/bin/dnstwist -rsw --thread=1 brew.sh
Traceback (most recent call last):
  File "/usr/local/Cellar/dnstwist/20201022/libexec/bin/dnstwist", line 962, in <module>
    main()
  File "/usr/local/Cellar/dnstwist/20201022/libexec/bin/dnstwist", line 936, in main
    if whoisq.creation_date:
AttributeError: 'NoneType' object has no attribute 'creation_date'
     _           _            _     _
  __| |_ __  ___| |___      _(_)___| |_
 / _` | '_ \/ __| __\ \ /\ / / / __| __|
| (_| | | | \__ \ |_ \ V  V /| \__ \ |_
 \__,_|_| |_|___/\__| \_/\_/ |_|___/\__| {20201022}

Fetching content from: http://brew.sh 200 OK (21.2 Kbytes)
Processing 910 permutations ···········21%···········44%·········64%··············86%······· 7 hits
Querying WHOIS servers ··

https://github.com/Homebrew/homebrew-core/pull/66472/checks?check_run_id=1517384199#step:6:3193

@bayandin bayandin mentioned this pull request Dec 9, 2020
5 tasks
@elceef
Copy link
Owner

elceef commented Dec 10, 2020

Although I can't reproduce this, you are right that it is possible to return None. Your change was committed in 5be9207. Thank you for contributing!

@bayandin
Copy link
Contributor Author

Thanks!

@bayandin bayandin closed this Dec 10, 2020
@bayandin bayandin deleted the patch-1 branch December 10, 2020 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants