enable http and mechanize debugs before calling home()
This commit is contained in:
parent
90f9608ffa
commit
abb9b3dfc3
1 changed files with 7 additions and 6 deletions
|
|
@ -227,12 +227,6 @@ class BaseBrowser(mechanize.Browser):
|
|||
self.username = username
|
||||
self.password = password
|
||||
self.lock = RLock()
|
||||
if self.password and get_home:
|
||||
try:
|
||||
self.home()
|
||||
# Do not abort the build of browser when the website is down.
|
||||
except BrowserUnavailable:
|
||||
pass
|
||||
|
||||
if self.DEBUG_HTTP:
|
||||
# display messages from httplib
|
||||
|
|
@ -242,6 +236,13 @@ class BaseBrowser(mechanize.Browser):
|
|||
# Enable log messages from mechanize.Browser
|
||||
self.set_debug_redirects(True)
|
||||
|
||||
if self.password and get_home:
|
||||
try:
|
||||
self.home()
|
||||
# Do not abort the build of browser when the website is down.
|
||||
except BrowserUnavailable:
|
||||
pass
|
||||
|
||||
def __enter__(self):
|
||||
self.lock.acquire()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue