mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 08:09:10 +02:00
Add type annotations to the certbot package (part 1) (#9084)
* Extract from #9084 * Cast/ignore types during the transition * Fix after review * Fix lint
This commit is contained in:
@@ -2437,10 +2437,9 @@ class ApacheConfigurator(common.Installer, interfaces.Authenticator):
|
||||
except errors.SubprocessError as err:
|
||||
logger.warning("Unable to restart apache using %s",
|
||||
self.options.restart_cmd)
|
||||
alt_restart = self.options.restart_cmd_alt
|
||||
if alt_restart:
|
||||
if self.options.restart_cmd_alt:
|
||||
logger.debug("Trying alternative restart command: %s",
|
||||
alt_restart)
|
||||
self.options.restart_cmd_alt)
|
||||
# There is an alternative restart command available
|
||||
# This usually is "restart" verb while original is "graceful"
|
||||
try:
|
||||
|
||||
@@ -118,7 +118,8 @@ class DebianConfigurator(configurator.ApacheConfigurator):
|
||||
# Generate reversal command.
|
||||
# Try to be safe here... check that we can probably reverse before
|
||||
# applying enmod command
|
||||
if not util.exe_exists(self.options.dismod):
|
||||
if (self.options.dismod is None or self.options.enmod is None
|
||||
or not util.exe_exists(self.options.dismod)):
|
||||
raise errors.MisconfigurationError(
|
||||
"Unable to find a2dismod, please make sure a2enmod and "
|
||||
"a2dismod are configured correctly for certbot.")
|
||||
|
||||
Reference in New Issue
Block a user