sharsil / mailcat

Find existing email addresses by nickname using API/SMTP checking methods without user notification. Please, don't hesitate to improve cat's job! 🐱🔎 📬
Apache License 2.0
565 stars 77 forks source link

🔧 Fixing Deprecation Warning #37

Closed C3n7ral051nt4g3ncy closed 1 year ago

C3n7ral051nt4g3ncy commented 1 year ago

Regarding Issue #25

This warning is raised when you try to get the event loop before running it.

I was getting also this Error:

/Users/xxxxxxx/mailcat/mailcat.py:1818: DeprecationWarning: There is no current event loop
  jobs = asyncio.gather(*[print_results(checker, target, req_session_fun, args.verbose) for checker in checkers])

The fix works and I have tested it multiple times.

soxoj commented 1 year ago

I see that you defined the new function in a top-level context, and then you are checking again if it's the call of the main. Suggest making all the new lines in the second nesting level, and just main without if __name__=='main' context

C3n7ral051nt4g3ncy commented 1 year ago

@soxoj I have taken off Tutby

C3n7ral051nt4g3ncy commented 1 year ago

@soxoj Please check script. Now everything is working, no more errors anywhere.

Screen Shot 2023-04-25 at 23 54 48
C3n7ral051nt4g3ncy commented 1 year ago

@soxoj Please check the script. It seems everything is working nicely now.

soxoj commented 1 year ago

Checked, all good, thanks!