diff --git a/scripts/encrypt_password.py b/scripts/encrypt_password.py index 0aa69ea..558f76d 100755 --- a/scripts/encrypt_password.py +++ b/scripts/encrypt_password.py @@ -10,15 +10,19 @@ GPGHOME = "/etc/salt/gpgkeys" def parse_args(): parser = argparse.ArgumentParser(description='Encrypt password') - parser.add_argument('password', type=str, nargs=1, + parser.add_argument('password', + type=str, + nargs=1, help='password to encrypt') args = parser.parse_args() return args def encrypt(password=""): - gpg = gnupg.GPG(gnupghome=GPGHOME, secret_keyring=KEYID) - encrypted_password = gpg.encrypt(password, KEYID) + gpg = gnupg.GPG(gnupghome=GPGHOME, + secret_keyring=KEYID) + encrypted_password = gpg.encrypt(password, + KEYID) return encrypted_password