From a5ad9238a1c4bf719fa4ff0c05c916be5df3b19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Fri, 12 May 2017 20:52:25 +0000 Subject: [PATCH] cli: Lazier import for pwd --- certidude/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/certidude/cli.py b/certidude/cli.py index 03278f4..8833c5f 100755 --- a/certidude/cli.py +++ b/certidude/cli.py @@ -5,7 +5,6 @@ import click import hashlib import logging import os -import pwd import random import re import signal @@ -745,6 +744,7 @@ def certidude_setup_authority(username, kerberos_keytab, nginx_config, country, if not os.path.exists("/usr/sbin/nginx"): os.system("apt-get install -y nginx") + import pwd from cryptography import x509 from cryptography.x509.oid import NameOID, ExtendedKeyUsageOID from cryptography.hazmat.backends import default_backend @@ -1095,6 +1095,7 @@ def certidude_cron(): @click.option("-l", "--listen", default="0.0.0.0", help="Listen address") @click.option("-f", "--fork", default=False, is_flag=True, help="Fork to background") def certidude_serve(port, listen, fork, exit_handler): + import pwd from setproctitle import setproctitle from certidude.signer import SignServer from certidude import authority, const