tools/web: fix isURL function
This commit is contained in:
parent
2fd20d9002
commit
f1da640a5b
|
@ -23,7 +23,7 @@ from nemubot.exception import IMException
|
||||||
def isURL(url):
|
def isURL(url):
|
||||||
"""Return True if the URL can be parsed"""
|
"""Return True if the URL can be parsed"""
|
||||||
o = urlparse(_getNormalizedURL(url))
|
o = urlparse(_getNormalizedURL(url))
|
||||||
return o.netloc == "" and o.path == ""
|
return o.netloc != "" and o.path != ""
|
||||||
|
|
||||||
|
|
||||||
def _getNormalizedURL(url):
|
def _getNormalizedURL(url):
|
||||||
|
|
Loading…
Reference in New Issue