mirror of
https://github.com/certbot/certbot.git
synced 2026-07-31 18:34:41 +02:00
Rename util to certbot_util
This commit is contained in:
@@ -9,7 +9,7 @@ import zope.interface
|
||||
|
||||
from certbot import errors
|
||||
from certbot import interfaces
|
||||
from certbot import util
|
||||
from certbot import util as certbot_util
|
||||
from certbot.plugins import common as plugins_common
|
||||
from certbot.plugins import util as plugins_util
|
||||
|
||||
@@ -125,7 +125,7 @@ class Installer(plugins_common.Plugin):
|
||||
:raises .NoInstallationError: when unable to find 'postconf'
|
||||
|
||||
"""
|
||||
if not util.exe_exists(self.conf("config-utility")):
|
||||
if not certbot_util.exe_exists(self.conf("config-utility")):
|
||||
if not plugins_util.path_surgery(self.conf("config-utility")):
|
||||
raise errors.NoInstallationError(
|
||||
"Cannot find executable '{0}'. You can provide the "
|
||||
|
||||
@@ -43,7 +43,7 @@ class TestPostfixConfigGenerator(unittest.TestCase):
|
||||
installer = self._create_installer()
|
||||
|
||||
installer_path = "certbot_postfix.installer"
|
||||
exe_exists_path = installer_path + ".util.exe_exists"
|
||||
exe_exists_path = installer_path + ".certbot_util.exe_exists"
|
||||
path_surgery_path = installer_path + ".plugins_util.path_surgery"
|
||||
|
||||
with mock.patch(path_surgery_path, return_value=False):
|
||||
@@ -84,7 +84,7 @@ class TestPostfixConfigGenerator(unittest.TestCase):
|
||||
"""
|
||||
installer = self._create_installer()
|
||||
|
||||
exe_exists_path = "certbot_postfix.installer.util.exe_exists"
|
||||
exe_exists_path = "certbot_postfix.installer.certbot_util.exe_exists"
|
||||
popen_path = "certbot_postfix.installer.subprocess.Popen"
|
||||
with mock.patch(exe_exists_path, return_value=True) as mock_exe_exists:
|
||||
with mock.patch(popen_path) as mock_popen:
|
||||
|
||||
Reference in New Issue
Block a user