pimoroni / automation-hat

Python library and examples for the Pimoroni Automation HAT, pHAT and HAT Mini
https://shop.pimoroni.com/products/automation-hat
MIT License
122 stars 41 forks source link

Fix deprecation warning in Python 3.7 #23

Closed henzef closed 5 years ago

henzef commented 5 years ago

Starting with Python 3.7 the automationhat library triggered the following warning: "PendingDeprecationWarning: isAlive() is deprecated, use is_alive() instead"

This commit replaces usage of the deprecated Thread.isAlive() function with is_alive(), which was introduced in Python 2.6.

Gadgetoid commented 5 years ago

Thank you- much appreciated! Looks like I should have never used isAlive in the first place, given its more Pythonic alternative name.