fixing URL parsing

This commit is contained in:
brent s 2018-05-08 10:04:05 -04:00
parent 4f775159c8
commit 07ab9840ca

View File

@ -319,20 +319,16 @@ class CertParse(object):


def validDomain(self, domain): def validDomain(self, domain):
is_valid = False is_valid = False
try: if not isinstance(validators.domain(domain),
validators.domain(domain) validators.utils.ValidationFailure):
is_valid = True is_valid = True
except ValidationFailure:
pass
return(is_valid) return(is_valid)


def validURL(self, url): def validURL(self, url):
is_valid = False is_valid = False
try: if not isinstance(validators.url(url),
validators.url(url) validators.utils.ValidationFailure):
is_valid = True is_valid = True
except ValidationFailure:
pass
return(is_valid) return(is_valid)


def validPath(self, path): def validPath(self, path):