Add the nologin option to "submit"
Signed-off-by: Romain Bignon <romain@peerfuse.org>
This commit is contained in:
parent
c5d53d3a39
commit
7a2b21f1b6
1 changed files with 2 additions and 1 deletions
|
|
@ -438,8 +438,9 @@ class BaseBrowser(StandardBrowser):
|
||||||
"""
|
"""
|
||||||
Submit the selected form.
|
Submit the selected form.
|
||||||
"""
|
"""
|
||||||
|
nologin = kwargs.pop('nologin', False)
|
||||||
try:
|
try:
|
||||||
self._change_location(mechanize.Browser.submit(self, *args, **kwargs))
|
self._change_location(mechanize.Browser.submit(self, *args, **kwargs), no_login=nologin)
|
||||||
except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError, BadStatusLine), e:
|
except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError, BadStatusLine), e:
|
||||||
self.page = None
|
self.page = None
|
||||||
raise self.get_exception(e)(e)
|
raise self.get_exception(e)(e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue