Skip to content

Commit

Permalink
Merge pull request #2132 from home-assistant/hotfix-20-1
Browse files Browse the repository at this point in the history
Hotfix 0.20.1
  • Loading branch information
balloob committed May 22, 2016
2 parents 37bd93a + ceb0ec5 commit 3c364fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions homeassistant/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,18 @@ def try_to_restart():
# 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
# useful when debugging shutdown/restart issues.
nthreads = sum(thread.isAlive() and not thread.isDaemon()
for thread in threading.enumerate())
if nthreads > 1:
sys.stderr.write("Found {} non-daemonic threads.\n".format(nthreads))
try:
nthreads = sum(thread.isAlive() and not thread.isDaemon()
for thread in threading.enumerate())
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
# should be any children that have not themselves changed the process
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/const.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
"""Constants used by Home Assistant components."""

__version__ = "0.20.0"
__version__ = "0.20.1"
REQUIRED_PYTHON_VER = (3, 4)

PLATFORM_FORMAT = '{}.{}'
Expand Down

0 comments on commit 3c364fa

Please sign in to comment.