From: ueno Date: Wed, 5 Sep 2007 08:20:52 +0000 (+0000) Subject: * epa.el (epa--show-key): Don't signal an error even if a time cannot be decoded. X-Git-Tag: epg-0_0_15 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25319092c7fbf699c3cd40b9916ea501973e341b;p=elisp%2Fepg.git * epa.el (epa--show-key): Don't signal an error even if a time cannot be decoded. --- 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