egeland / nagios-rbl-check

Icinga/Nagios spam blacklist check, written in python
GNU General Public License v3.0
34 stars 18 forks source link

DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead #26

Closed pvsa closed 1 year ago

pvsa commented 1 year ago

When running nagios-rbl-check # ./check_rbl.py -h mx4 -w 0 -c 1 I get message: ...nagios-rbl-check/./check_rbl.py:271: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead t.setDaemon(True)

Repo is up to date

smashedr commented 1 year ago

The fix is simple.

     # Spawn a pool of threads then pass them the queue
     for i in range(10):
         t = ThreadRBL(queue)
-        t.setDaemon(True)
+        t.daemon = True
         t.start()

Just a warning as of 3.11. I will get a PR in and see if this passes all tests when I get a chance.

pvsa commented 1 year ago

Hi,Thanks for the hint. Short Test with python3.10, python3.11 works like a Charme.I inform you if some failures come up.BrPAm 19.06.2023 um 22:36 schrieb SmAsHeD @.***>: The fix is simple.

Spawn a pool of threads then pass them the queue

 for i in range(10):
     t = ThreadRBL(queue)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

egeland commented 1 year ago

Closed in #27 - nice work, folks! I have to say, it's really cool that this little thing I created so long ago now is still being used! 😀