'Stop a managed service'

def stop(self):

    if (not self.managed):
        raise RuntimeError(('Cannot    stop    unmanaged    service    %s' % self))
    if self.spawner:
        self.spawner.stop_polling()
        return self.spawner.stop()
