Avoid an AttributeError if no session is used for a module
This commit is contained in:
parent
48482947c2
commit
12401f616b
@ -120,9 +120,13 @@ def main(used_modules):
|
|||||||
logging.error("%s capability is not implemented.", capability)
|
logging.error("%s capability is not implemented.", capability)
|
||||||
continue
|
continue
|
||||||
# Store session cookie of this module, to fetch files afterwards
|
# Store session cookie of this module, to fetch files afterwards
|
||||||
fetched_data[module["id"]]["cookies"] = dict_from_cookiejar(
|
try:
|
||||||
backend.browser.session.cookies
|
fetched_data[module["id"]]["cookies"] = dict_from_cookiejar(
|
||||||
)
|
backend.browser.session.cookies
|
||||||
|
)
|
||||||
|
except AttributeError:
|
||||||
|
# Avoid an AttributeError if no session is used for this module
|
||||||
|
fetched_data[module["id"]]["cookies"] = None
|
||||||
logging.info("Done fetching from konnectors.")
|
logging.info("Done fetching from konnectors.")
|
||||||
return fetched_data
|
return fetched_data
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user