fixing URL parsing
This commit is contained in:
parent
4f775159c8
commit
07ab9840ca
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user