[mhonarc] Catch all exceptions when parsing dates



commit ec0e6e740748c146952925349ebf69539556e066
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Fri Nov 8 12:35:46 2019 +0100

    Catch all exceptions when parsing dates

 archive.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/archive.py b/archive.py
index 2138db7..26861d5 100755
--- a/archive.py
+++ b/archive.py
@@ -173,12 +173,12 @@ class Archiver:
             if received_time is None:
                 try:
                     received_time = dateutil.parser.parse(received_time)
-                except ValueError:
+                except:
                     received_time = None
 
                 try:
                     received_time = email.utils.mktime_tz(received_time)
-                except ValueError:
+                except:
                     received_time = None
 
             if received_time is not None:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]