compare instance to basestring instead of (str, unicode)
This commit is contained in:
parent
3ced2bee38
commit
8afff42465
9 changed files with 13 additions and 13 deletions
|
|
@ -224,7 +224,7 @@ class BaseBrowser(mechanize.Browser):
|
|||
|
||||
def check_location(func):
|
||||
def inner(self, *args, **kwargs):
|
||||
if args and isinstance(args[0], (str,unicode)) and args[0][0] == '/' and \
|
||||
if args and isinstance(args[0], basestring) 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:]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue