orchestra/daemon: Fix proc AttributeError: 'NoneType'
Fixes the chance of calling signal() on a  daemon which is not running.
@@ -98,13 +98,16 @@ class DaemonState(object):
def signal(self, sig, silent=False):
"""
- Send a signal to associated remote commnad
+ Send a signal to associated remote command.
:param sig: signal to send
"""
+ if self.running():
self.proc.stdin.write(struct.pack('!b', sig))
if not silent:
self.log.info('Sent signal %d', sig)
+ else:
+ self.log.info('No such daemon running')
def start(self, timeout=300):
"""
