mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
commit
3c364fa7e9
@ -321,10 +321,18 @@ def try_to_restart():
|
|||||||
# Count remaining threads, ideally there should only be one non-daemonized
|
# Count remaining threads, ideally there should only be one non-daemonized
|
||||||
# thread left (which is us). Nothing we really do with it, but it might be
|
# thread left (which is us). Nothing we really do with it, but it might be
|
||||||
# useful when debugging shutdown/restart issues.
|
# useful when debugging shutdown/restart issues.
|
||||||
nthreads = sum(thread.isAlive() and not thread.isDaemon()
|
try:
|
||||||
for thread in threading.enumerate())
|
nthreads = sum(thread.isAlive() and not thread.isDaemon()
|
||||||
if nthreads > 1:
|
for thread in threading.enumerate())
|
||||||
sys.stderr.write("Found {} non-daemonic threads.\n".format(nthreads))
|
if nthreads > 1:
|
||||||
|
sys.stderr.write(
|
||||||
|
"Found {} non-daemonic threads.\n".format(nthreads))
|
||||||
|
|
||||||
|
# Somehow we sometimes seem to trigger an assertion in the python threading
|
||||||
|
# module. It seems we find threads that have no associated OS level thread
|
||||||
|
# which are not marked as stopped at the python level.
|
||||||
|
except AssertionError:
|
||||||
|
sys.stderr.write("Failed to count non-daemonic threads.\n")
|
||||||
|
|
||||||
# Send terminate signal to all processes in our process group which
|
# Send terminate signal to all processes in our process group which
|
||||||
# should be any children that have not themselves changed the process
|
# should be any children that have not themselves changed the process
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
"""Constants used by Home Assistant components."""
|
"""Constants used by Home Assistant components."""
|
||||||
|
|
||||||
__version__ = "0.20.0"
|
__version__ = "0.20.1"
|
||||||
REQUIRED_PYTHON_VER = (3, 4)
|
REQUIRED_PYTHON_VER = (3, 4)
|
||||||
|
|
||||||
PLATFORM_FORMAT = '{}.{}'
|
PLATFORM_FORMAT = '{}.{}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user