New argument to refresh keyring on demand
This commit is contained in:
parent
65fb49d080
commit
e5eb0795f2
6
check.py
6
check.py
@ -208,6 +208,9 @@ if __name__ == '__main__':
|
|||||||
import argparse
|
import argparse
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
|
parser.add_argument("-R", "--refresh-keys", action="store_true",
|
||||||
|
help="refresh GnuPG keyring")
|
||||||
|
|
||||||
parser.add_argument("-s", "--sign", action="store_true",
|
parser.add_argument("-s", "--sign", action="store_true",
|
||||||
help="limit check to signature")
|
help="limit check to signature")
|
||||||
|
|
||||||
@ -243,6 +246,9 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
if args.refresh_keys:
|
||||||
|
subprocess.Popen(["gpg", "--homedir=" + GNUPG_DIRECTORY, "--batch", "--refresh-keys"])
|
||||||
|
|
||||||
if not args.skip_max_submission:
|
if not args.skip_max_submission:
|
||||||
with subprocess.Popen(["date", "-d", args.soft_max_submission, "-u", "-Iseconds"], stdout=subprocess.PIPE) as f:
|
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")
|
SOFT_MAX_SUBMISSION = datetime.strptime(f.stdout.read().strip().decode().replace(":", ""), "%Y-%m-%dT%H%M%S%z")
|
||||||
|
Reference in New Issue
Block a user