urlmatch: Remove dead code
This commit is contained in:
parent
7033af816a
commit
894da598d6
@ -186,6 +186,12 @@ class UrlPattern:
|
|||||||
# FIXME what about multiple dots?
|
# FIXME what about multiple dots?
|
||||||
host = host.rstrip('.')
|
host = host.rstrip('.')
|
||||||
|
|
||||||
|
# If we have no host in the match pattern, that means that we're
|
||||||
|
# matching all hosts, which means we have a match no matter what the
|
||||||
|
# test host is.
|
||||||
|
# Contrary to Chromium, we don't need to check for
|
||||||
|
# self._match_subdomains, as we want to return True here for e.g.
|
||||||
|
# file:// as well.
|
||||||
if self._host is None:
|
if self._host is None:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -193,12 +199,6 @@ class UrlPattern:
|
|||||||
if host == self._host:
|
if host == self._host:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# If we're matching subdomains, and we have no host in the match
|
|
||||||
# pattern, that means that we're matching all hosts, which means we
|
|
||||||
# have a match no matter what the test host is.
|
|
||||||
if self._match_subdomains and not self._host:
|
|
||||||
return True
|
|
||||||
|
|
||||||
# Otherwise, we can only match if our match pattern matches subdomains.
|
# Otherwise, we can only match if our match pattern matches subdomains.
|
||||||
if not self._match_subdomains:
|
if not self._match_subdomains:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user