Update expired keys (#21539)

If a key has expired it will not be added by this module, so check for "expired" in the list of keys.
Example output with expired key:

pub   1024D/5072E1F5 2003-02-03 [expired: 2017-02-16]
uid                  MySQL Release Engineering <mysql-build@oss.oracle.com>
This commit is contained in:
Clemens Weiß 2017-03-03 20:53:21 +01:00 committed by René Moser
parent 9f1a71797e
commit 7018aa3316

View file

@ -200,7 +200,7 @@ def all_keys(module, keyring, short_format):
results = []
lines = to_native(out).split('\n')
for line in lines:
if line.startswith("pub") or line.startswith("sub"):
if (line.startswith("pub") or line.startswith("sub")) and not "expired" in line:
tokens = line.split()
code = tokens[1]
(len_type, real_code) = code.split("/")