def handle_event(self, event):
     CfgVerifier.handle_event(self, event)
     if not self.data:
         return
     self.cmd = []
     if not os.access(self.name, os.X_OK):
         bangpath = self.data.splitlines()[0].strip()
         if bangpath.startswith("#!"):
             self.cmd.extend(shlex.split(bangpath[2:].strip()))
         else:
             raise PluginExecutionError("Cannot execute %s" % self.name)
     self.cmd.append(self.name)
 def handle_event(self, event):
     CfgVerifier.handle_event(self, event)
     if not self.data:
         return
     self.cmd = []
     if not os.access(self.name, os.X_OK):
         bangpath = self.data.splitlines()[0].strip()
         if bangpath.startswith("#!"):
             self.cmd.extend(shlex.split(bangpath[2:].strip()))
         else:
             raise PluginExecutionError("Cannot execute %s" % self.name)
     self.cmd.append(self.name)
 def handle_event(self, event):
     CfgVerifier.handle_event(self, event)
     if not self.data:
         return
     self.cmd = []
     if not os.access(self.name, os.X_OK):
         bangpath = self.data.splitlines()[0].strip()
         if bangpath.startswith("#!"):
             self.cmd.extend(shlex.split(bangpath[2:].strip()))
         else:
             msg = "%s: Cannot execute %s" % (self.__class__.__name__,
                                              self.name)
             LOGGER.error(msg)
             raise Bcfg2.Server.Plugin.PluginExecutionError(msg)
     self.cmd.append(self.name)
 def __init__(self, name, specific, encoding):
     CfgVerifier.__init__(self, name, specific, encoding)
     self.cmd = []
     self.exc = Executor(timeout=30)
 def __init__(self, name, specific, encoding):
     CfgVerifier.__init__(self, name, specific, encoding)
     self.cmd = []
     self.exc = Executor(timeout=30)
Example #6
0
 def __init__(self, fname):
     XMLCfgCreator.__init__(self, fname)
     CfgVerifier.__init__(self, fname, None)
     self.cmd = Executor()
     self.cfg = get_cfg()
 def __init__(self, name, specific, encoding):
     CfgVerifier.__init__(self, name, specific, encoding)
     self.cmd = []