Skip to content

Commit

Permalink
domain-expiration: Properly handling not registered domains
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Jul 29, 2019
1 parent 4be43d2 commit f87a06a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infracheck/checks/domain-expiration
Expand Up @@ -42,7 +42,7 @@ class DomainCheck:
try:
query = self.whois.query(self._domain)

if not query.expiration_date:
if not query or not query.expiration_date:
return self._parse_shell_whois(self._domain)

return query
Expand All @@ -62,7 +62,7 @@ class DomainCheck:
if match:
return ManualCheck(expiration_date=str_to_date(match.group(1)))

return ''
return ManualCheck(expiration_date=None)


def perform_check(self) -> tuple:
Expand Down

0 comments on commit f87a06a

Please sign in to comment.