commit: 1f8fc87469153591e4cefeb93bdff0ba995c5190
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 18 15:32:17 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Mar 18 15:32:17 2015 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=1f8fc874
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.
gkeys/gkeys/checks.py | 6 +++---
1 file 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