Url._url_check should return None
There's no point in returning True if it's never checked and won't ever be False. Implicitly returning None or raising an exception is more idiomatic.
This commit is contained in:
parent
77bc275333
commit
168ef1854a
@ -64,7 +64,6 @@ class Url:
|
|||||||
"""Check for common URL problems."""
|
"""Check for common URL problems."""
|
||||||
if "." not in self.url:
|
if "." not in self.url:
|
||||||
raise URLError("'%s' is not a vaild URL." % self.url)
|
raise URLError("'%s' is not a vaild URL." % self.url)
|
||||||
return True
|
|
||||||
|
|
||||||
def _clean_url(self):
|
def _clean_url(self):
|
||||||
"""Fix the URL, if possible."""
|
"""Fix the URL, if possible."""
|
||||||
|
Loading…
Reference in New Issue
Block a user