From 25319092c7fbf699c3cd40b9916ea501973e341b Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 5 Sep 2007 08:20:52 +0000 Subject: [PATCH] * epa.el (epa--show-key): Don't signal an error even if a time cannot be decoded. --- ChangeLog | 1 + epa.el | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 594ab47..8d13601 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ * epa.el (epa-validity-face-alist): Fixed misuse of the list widget type. (epa-font-lock-keywords): Define as defvar. + (epa--show-key): Don't signal an error even if a time cannot be decoded. * epa-file.el (epa-file-auto-mode-alist-entry): New variable. (epa-file-enable): Install a strip-suffix entry in auto-mode-alist. diff --git a/epa.el b/epa.el index b791ea9..8c7305b 100644 --- a/epa.el +++ b/epa.el @@ -571,13 +571,17 @@ If SECRET is non-nil, list secret keys instead of public keys." (cdr (assq (epg-sub-key-algorithm (car pointer)) epg-pubkey-algorithm-alist)) "\n\tCreated: " - (format-time-string "%Y-%m-%d" - (epg-sub-key-creation-time (car pointer))) + (condition-case nil + (format-time-string "%Y-%m-%d" + (epg-sub-key-creation-time (car pointer))) + (error "????-??-??")) (if (epg-sub-key-expiration-time (car pointer)) (format "\n\tExpires: %s" - (format-time-string "%Y-%m-%d" - (epg-sub-key-expiration-time - (car pointer)))) + (condition-case nil + (format-time-string "%Y-%m-%d" + (epg-sub-key-expiration-time + (car pointer))) + (error "????-??-??"))) "") "\n\tCapabilities: " (mapconcat #'symbol-name -- 1.7.10.4