Browser.home()'s default behavior is to go on PROTOCOL://DOMAIN
This commit is contained in:
parent
be642f00e9
commit
15625b9fa7
1 changed files with 1 additions and 2 deletions
|
|
@ -94,7 +94,7 @@ class Browser(mechanize.Browser):
|
|||
"""
|
||||
Go to the home page.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
self.location('%s://%s' % (self.PROTOCOL, self.DOMAIN))
|
||||
|
||||
def login(self):
|
||||
"""
|
||||
|
|
@ -151,7 +151,6 @@ class Browser(mechanize.Browser):
|
|||
def inner(self, *args, **kwargs):
|
||||
if args and isinstance(args[0], (str,unicode)) and args[0][0] == '/' and (not self.request or self.request.host != self.DOMAIN):
|
||||
args = ('%s://%s%s' % (self.PROTOCOL, self.DOMAIN, args[0]),) + args[1:]
|
||||
print args
|
||||
|
||||
return func(self, *args, **kwargs)
|
||||
return inner
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue