Ejemplo n.º 1
0
 def _run_undo_commands(self, filepath):  # pylint: disable=no-self-use
     """Run all commands in a file."""
     with open(filepath, 'rb') as csvfile:
         csvreader = csv.reader(csvfile)
         for command in reversed(list(csvreader)):
             try:
                 le_util.run_script(command)
             except errors.SubprocessError:
                 logger.error("Unable to run undo command: %s",
                              " ".join(command))
Ejemplo n.º 2
0
 def _run_undo_commands(self, filepath):  # pylint: disable=no-self-use
     """Run all commands in a file."""
     with open(filepath, 'rb') as csvfile:
         csvreader = csv.reader(csvfile)
         for command in reversed(list(csvreader)):
             try:
                 le_util.run_script(command)
             except errors.SubprocessError:
                 logger.error(
                     "Unable to run undo command: %s", " ".join(command))
Ejemplo n.º 3
0
    def config_test(self):  # pylint: disable=no-self-use
        """Check the configuration of Nginx for errors.

        :raises .errors.MisconfigurationError: If config_test fails

        """
        try:
            le_util.run_script([self.conf("ctl"), "-c", self.nginx_conf, "-t"])
        except errors.SubprocessError as err:
            raise errors.MisconfigurationError(str(err))
Ejemplo n.º 4
0
    def config_test(self):  # pylint: disable=no-self-use
        """Check the configuration of Nginx for errors.

        :raises .errors.MisconfigurationError: If config_test fails

        """
        try:
            le_util.run_script([self.conf('ctl'), "-c", self.nginx_conf, "-t"])
        except errors.SubprocessError as err:
            raise errors.MisconfigurationError(str(err))
Ejemplo n.º 5
0
 def _call(cls, params):
     from certbot.le_util import run_script
     return run_script(params)
Ejemplo n.º 6
0
 def _call(cls, params):
     from certbot.le_util import run_script
     return run_script(params)