diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jarabe/journal/misc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jarabe/journal/misc.py b/src/jarabe/journal/misc.py index 52a86fa..7e6906a 100644 --- a/src/jarabe/journal/misc.py +++ b/src/jarabe/journal/misc.py @@ -65,13 +65,13 @@ def get_icon_name(metadata): if file_name is None and is_activity_bundle(metadata): file_path = model.get_file(metadata['uid']) - if os.path.exists(file_path): + if file_path is not None and os.path.exists(file_path): try: bundle = ActivityBundle(file_path) file_name = bundle.get_icon() - except Exception: + except: logging.warning('Could not read bundle:\n' + \ - ''.join(traceback.format_exception(*sys.exc_info()))) + traceback.format_exc()) if file_name is None: file_name = _get_icon_for_mime(metadata.get('mime_type', '')) |