fix: selenium variable might be referenced before assignement

resolves #96
This commit is contained in:
Puyodead1 2022-01-10 16:38:30 -05:00 committed by Puyodead1
parent 53f8cd6031
commit ad74eed395
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -65,6 +65,7 @@ stream: logging.StreamHandler = None
username: str = None username: str = None
password: str = None password: str = None
headless = True headless = True
selenium = None
# from https://stackoverflow.com/a/21978778/9785713 # from https://stackoverflow.com/a/21978778/9785713
@ -1913,7 +1914,8 @@ def _print_course_info(udemy: Udemy, udemy_object: dict):
def main(): def main():
global bearer_token global bearer_token, selenium
aria_ret_val = check_for_aria() aria_ret_val = check_for_aria()
if not aria_ret_val: if not aria_ret_val:
logger.fatal("> Aria2c is missing from your system or path!") logger.fatal("> Aria2c is missing from your system or path!")