New argument to refresh keyring on demand

This commit is contained in:
nemunaire 2018-04-08 20:34:17 +02:00
parent 65fb49d080
commit e5eb0795f2
1 changed files with 6 additions and 0 deletions

View File

@ -208,6 +208,9 @@ if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-R", "--refresh-keys", action="store_true",
help="refresh GnuPG keyring")
parser.add_argument("-s", "--sign", action="store_true",
help="limit check to signature")
@ -243,6 +246,9 @@ if __name__ == '__main__':
args = parser.parse_args()
if args.refresh_keys:
subprocess.Popen(["gpg", "--homedir=" + GNUPG_DIRECTORY, "--batch", "--refresh-keys"])
if not args.skip_max_submission:
with subprocess.Popen(["date", "-d", args.soft_max_submission, "-u", "-Iseconds"], stdout=subprocess.PIPE) as f:
SOFT_MAX_SUBMISSION = datetime.strptime(f.stdout.read().strip().decode().replace(":", ""), "%Y-%m-%dT%H%M%S%z")