From c50103870e4fc26743da5a9770c29df74b70e14a Mon Sep 17 00:00:00 2001 From: Maran Date: Wed, 5 Dec 2012 22:55:15 +0100 Subject: [PATCH] Handle exceptions on parsing better --- lib/gui_lite.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/gui_lite.py b/lib/gui_lite.py index 72e5fb8e..f1c8dadd 100644 --- a/lib/gui_lite.py +++ b/lib/gui_lite.py @@ -748,11 +748,12 @@ class MiniActuator: for item in self.wallet.get_tx_history(): tx_hash, confirmations, is_mine, value, fee, balance, timestamp = item if confirmations: - try: - time_string = datetime.datetime.fromtimestamp( timestamp).isoformat(' ')[:-3] - except [RuntimeError, TypeError, NameError] as reason: - print reason - time_string = "unknown" + if timestamp is not None: + try: + time_string = datetime.datetime.fromtimestamp( timestamp).isoformat(' ')[:-3] + except [RuntimeError, TypeError, NameError] as reason: + time_string = "unknown" + pass else: time_string = "pending"