diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2015-03-18 08:32:17 -0700 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2015-03-18 08:32:17 -0700 |
commit | 1f8fc87469153591e4cefeb93bdff0ba995c5190 (patch) | |
tree | 9edbc6cddd645a4529b7fd9ddf8977463a9d7520 | |
parent | gkeys/checks.py: Fix the expiry warning summary not detecting any (diff) | |
download | gentoo-keys-1f8fc87469153591e4cefeb93bdff0ba995c5190.tar.gz gentoo-keys-1f8fc87469153591e4cefeb93bdff0ba995c5190.tar.bz2 gentoo-keys-1f8fc87469153591e4cefeb93bdff0ba995c5190.zip |
gkeys/checks.py: Downgrade the logging to warn from error
logging.error also prints to the screen which we don't want in this case.
The logging.warn is fine for these errors since they are already shown in a formatted output.
-rw-r--r-- | gkeys/gkeys/checks.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gkeys/gkeys/checks.py b/gkeys/gkeys/checks.py index a3af3ab..7e40720 100644 --- a/gkeys/gkeys/checks.py +++ b/gkeys/gkeys/checks.py @@ -369,10 +369,10 @@ class KeyChecks(object): stats[SPEC_INDEX['expire']] = True elif days > delta_t and not ('i' in data.validity or 'r' in data.validity): stats[SPEC_INDEX['expire_reason']] = '<== Exceeds specification' - self.logger.error("ERROR in key %s : gpg key expire date: %s EXCEEDS specification" + self.logger.warn("ERROR in key %s : gpg key expire date: %s EXCEEDS specification" % (data.long_keyid, data.expiredate)) else: - self.logger.error("ERROR in key %s : invalid gpg key expire date: %s" + self.logger.warn("ERROR in key %s : invalid gpg key expire date: %s" % (data.long_keyid, data.expiredate)) if 0 < days < 30 and not ('i' in data.validity or 'r' in data.validity): stats[SPEC_INDEX['expire_reason']] = '<== WARNING < 30 days' @@ -398,7 +398,7 @@ class KeyChecks(object): stats[SPEC_INDEX['encrypt_capable']] = True elif cap not in CAPABILITY_MAP: stats[SPEC_INDEX['caps']] = False - self.logger.error("ERROR in key %s : unknown gpg key capability: %s" + self.logger.warn("ERROR in key %s : unknown gpg key capability: %s" % (data.long_keyid, cap)) stats[SPEC_INDEX['long_caps']] = ', '.join(kcaps) return stats |