Skip to content

Commit

Permalink
#15: Code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed May 18, 2021
1 parent 7528f2d commit 95e1e29
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions infracheck/checks/domain-expiration
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Parameters:
</sphinx>
"""

from typing import Optional
import whois
import datetime
import pytz
Expand Down Expand Up @@ -100,7 +100,6 @@ class DomainCheck(object):
finally:
sys.stdout = _stdout_copy


@staticmethod
def _ask_whois_in_shell(domain: str) -> str:
return subprocess.check_output(['whois', domain]).decode('utf-8')
Expand Down Expand Up @@ -128,7 +127,7 @@ class DomainCheck(object):
return WhoisResult(expiration_date=None)

def perform_check(self) -> tuple:
domain_check: WhoisResult = self._check_with_wait()
domain_check: Optional[WhoisResult] = self._check_with_wait()

if domain_check is None or domain_check.expiration_date is None:
return False, "Domain seems to be not registered"
Expand Down

0 comments on commit 95e1e29

Please sign in to comment.