(self)
return False
Check if the target is alive
Check if the target is alive
Check if the target is alive
def is_alive(self):
        """Check if the target is alive"""
        if not self.config['target'].value is None:
            rval = init_app('ping -c 1 -w 1 %s' % \
                            self.config['target'].value, True)
            up = search('\d.*? received', rval)
            if search('0', up.group(0)) is None:
                return True
        return False
def is_alive ( self ) : if not self . config [ 'target' ] . value is None : rval = init_app ( 'ping -c 1 -w 1 %s' % self . config [ 'target' ] . value , True ) up = search ( '\d.*? received' , rval ) if search ( '0' , up . group ( 0 ) ) is None : return True return False