Fix a pending glitch. Thanks pyflakes!
Merge branch 'master' into issue159
working watchdog code.
Added a unit test for it