コード例 #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
ファイル: reverter.py プロジェクト: 1resu/letsencrypt
 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
ファイル: configurator.py プロジェクト: Ghostff/letsencrypt
    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
ファイル: configurator.py プロジェクト: paribr/letsencrypt-1
    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
ファイル: le_util_test.py プロジェクト: paribr/letsencrypt-1
 def _call(cls, params):
     from certbot.le_util import run_script
     return run_script(params)
コード例 #6
0
ファイル: le_util_test.py プロジェクト: AndyGWood1/certbot
 def _call(cls, params):
     from certbot.le_util import run_script
     return run_script(params)