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))
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))
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))
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))
def _call(cls, params): from certbot.le_util import run_script return run_script(params)