Commit 280bc7f8 authored by Edouard Lambert's avatar Edouard Lambert Committed by Romain Bignon

adding logged browser variable

parent 1c425cc4
......@@ -768,7 +768,8 @@ def need_login(func):
@wraps(func)
def inner(browser, *args, **kwargs):
if browser.page is None or not browser.page.logged:
if (not hasattr(browser, 'logged') or (hasattr(browser, 'logged') and not browser.logged)) and \
(browser.page is None or not browser.page.logged):
browser.do_login()
browser.logger.debug('logged in with session: %s', json.dumps(browser.export_session()))
return func(browser, *args, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment