def __init__(self, queue): """ We call the constructor for the class. :return: """ # Setup the class object HostProbe.__init__( self, self.name, queue, self.continuous ) self.logger.info( "Created a new Probe of type: %s" %self.type ) return
def __init__(self, queue): """ We call the constructor for the class. :return: """ # Check if ran as root if not os.geteuid() == 0: # If not root delete the self object and return self.logger.error( "To run the process probe, you need to run the " "plugin framework as root!. Deleting the probe " "and returning." ) del self gc.collect() return # Setup the class object HostProbe.__init__(self, self.name, queue, self.continuous) self.logger.info("Created a new Probe of type: %s" % self.type) return