DomainBrowser: ability to give the baseurl in constructor

This commit is contained in:
Romain Bignon 2015-01-02 16:47:04 +01:00 committed by Florent
commit 0ce0a7e9b5

View file

@ -471,6 +471,11 @@ class DomainBrowser(Browser):
More complex behavior is possible by overloading url_allowed()
"""
def __init__(self, baseurl=None, *args, **kwargs):
super(DomainBrowser, self).__init__(*args, **kwargs)
if baseurl is not None:
self.BASEURL = baseurl
def url_allowed(self, url):
"""
Checks if we are allowed to visit an URL.