예제 #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))
예제 #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))
예제 #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))
예제 #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))
예제 #5
0
 def _call(cls, params):
     from certbot.le_util import run_script
     return run_script(params)
예제 #6
0
 def _call(cls, params):
     from certbot.le_util import run_script
     return run_script(params)