Skip to content

Commit

Permalink
Merge pull request #229 from SuperLanceur/fix-asyncio
Browse files Browse the repository at this point in the history
Fix asyncio (aiodns) error
  • Loading branch information
C0D3D3V authored Sep 24, 2024
2 parents a42e4f8 + 5b592d9 commit 7a67d41
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 @@ -546,6 +546,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 7a67d41

Please sign in to comment.