OSDN Git Service

* epa.el (epa--show-key): Don't signal an error even if a time cannot be decoded.
authorDaiki Ueno <ueno@unixuser.org>
Wed, 5 Sep 2007 08:20:52 +0000 (08:20 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Wed, 5 Sep 2007 08:20:52 +0000 (08:20 +0000)
ChangeLog
epa.el

index 594ab47..8d13601 100644 (file)
--- 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 (file)
--- 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