Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion nrc_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def get_access_token(options):
"""

login_success = False
driver = None

if options["gecko_path"] and not options["manual"]:
info(f"🚗 Starting gecko webdriver")
Expand All @@ -247,6 +248,8 @@ def get_access_token(options):

if login_success:
access_token = extract_token(driver)
if driver:
driver.quit()
else:
info(
f"I will open your web browser and you will have to manually intercept the access tokens.\n"
Expand All @@ -271,7 +274,7 @@ def get_access_token(options):
info(
f"Closing the webdriver. From here on we will be using requests library instead"
)
driver.quit()

return access_token


Expand Down