Skip to content

Commit

Permalink
Fix asyncio (aiodns) error
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperLanceur authored Sep 21, 2024
1 parent 73fdf71 commit 5b592d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions moodle_dl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ def post_process_opts(opts: MoodleDlOpts):

# --- called at the program invocation: -------------------------------------
def main(args=None):
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
just_fix_windows_console()
opts = post_process_opts(MoodleDlOpts(**vars(get_parser().parse_args(args))))
setup_logger(opts)
Expand Down

0 comments on commit 5b592d9

Please sign in to comment.