diff --git a/src/jarabe/journal/misc.py b/src/jarabe/journal/misc.py
index 24ad216..d4a91f6 100644
a
|
b
|
def get_icon_name(metadata): |
84 | 84 | def get_date(metadata): |
85 | 85 | """ Convert from a string in iso format to a more human-like format. """ |
86 | 86 | if metadata.has_key('timestamp'): |
87 | | timestamp = float(metadata['timestamp']) |
88 | | return util.timestamp_to_elapsed_string(timestamp) |
| 87 | try: |
| 88 | timestamp = float(metadata['timestamp']) |
| 89 | except ValueError: |
| 90 | timestamp = None |
| 91 | if timestamp is None: |
| 92 | return _('No date') |
| 93 | else: |
| 94 | return util.timestamp_to_elapsed_string(timestamp) |
89 | 95 | elif metadata.has_key('mtime'): |
90 | 96 | ti = time.strptime(metadata['mtime'], "%Y-%m-%dT%H:%M:%S") |
91 | 97 | return util.timestamp_to_elapsed_string(time.mktime(ti)) |