mirror of
https://github.com/certbot/certbot.git
synced 2026-06-05 23:04:39 -04:00
try passing workspace through instead
This commit is contained in:
parent
714098e3c5
commit
c4be7c428c
2 changed files with 2 additions and 5 deletions
|
|
@ -39,7 +39,7 @@ def _prepare_args_env(certbot_args, directory_url, http_01_port, tls_alpn_01_por
|
|||
new_environ['TMPDIR'] = workspace
|
||||
|
||||
additional_args = []
|
||||
if misc.get_certbot_version() >= LooseVersion('0.30.0'):
|
||||
if misc.get_certbot_version(workspace) >= LooseVersion('0.30.0'):
|
||||
additional_args.append('--no-random-sleep-on-renew')
|
||||
|
||||
if force_renew:
|
||||
|
|
|
|||
|
|
@ -209,14 +209,11 @@ shutil.rmtree(well_known)
|
|||
shutil.rmtree(tempdir)
|
||||
|
||||
|
||||
def get_certbot_version():
|
||||
def get_certbot_version(workspace):
|
||||
"""
|
||||
Find the version of the certbot available in PATH.
|
||||
:return str: the certbot version
|
||||
"""
|
||||
workspace = os.environ.get('WORKSPACE', os.path.join(os.getcwd(), '.certbot_test_workspace'))
|
||||
if not os.path.exists(workspace):
|
||||
os.mkdir(workspace)
|
||||
output = subprocess.check_output(['certbot', '--version'],
|
||||
universal_newlines=True, stderr=subprocess.STDOUT,
|
||||
cwd=workspace)
|
||||
|
|
|
|||
Loading…
Reference in a new issue