Handle exceptions on parsing better

This commit is contained in:
Maran 2012-12-05 22:55:15 +01:00
parent 108da45e53
commit c50103870e
1 changed files with 6 additions and 5 deletions

View File

@ -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"