Added default time string

This commit is contained in:
Maran 2012-12-05 23:18:31 +01:00
parent 9083be46f7
commit 9bf12079ce
1 changed files with 3 additions and 1 deletions

View File

@ -750,10 +750,12 @@ class MiniActuator:
if confirmations: if confirmations:
if timestamp is not None: if timestamp is not None:
try: try:
time_string = datetime.datetime.fromtimestamp( timestamp).isoformat(' ')[:-3] time_string = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
except [RuntimeError, TypeError, NameError] as reason: except [RuntimeError, TypeError, NameError] as reason:
time_string = "unknown" time_string = "unknown"
pass pass
else:
time_string = "unknown"
else: else:
time_string = "pending" time_string = "pending"