Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2009-03-01 09:38:05 (GMT)
committer Tomeu Vizoso <tomeu@sugarlabs.org>2009-03-01 09:38:05 (GMT)
commit18116e8952dba28f45b94eababc86ae08e33a6ef (patch)
tree719ae2aae96ba1ff36c1dbe738cceab8419673ed /src
parentb34999336bf5c3a5d53022c993a6d1c29d455e6b (diff)
Support the case when an activity bundle is not completely downloaded and we need to display its icon #458
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/journal/misc.py6
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', ''))