Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/0003-825.patch
blob: aa9f46e1c9109f1983d9685f03bf9b99f2152b54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 25be6bf09a52249332424c325d335e66f21bdd68 Mon Sep 17 00:00:00 2001
From: Ajay Garg <ajay@activitycentral.com>
Date: Thu, 15 Mar 2012 12:02:14 +0530
Subject: [olpc-updater PATCH] au#825: Check for a existence for an already 
                                      existing "library" bundle; else the 
                                      corresponding "activity" will be 
                                      continued to be shown as new in 
                                      "Software-Update".
Organization: Sugar Labs Foundation
Signed-off-by: Ajay Garg <ajay@activitycentral.com>
---
 src/model.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/model.py b/src/model.py
index 974c050..60195c7 100755
--- a/src/model.py
+++ b/src/model.py
@@ -413,7 +413,11 @@ class UpdateList(gtk.ListStore):
                 zf.getinfo('%s/activity/activity.info' % activity_base)
                 is_activity = True
             except KeyError:
-                is_activity = False
+                try:
+                    zf.getinfo('%s/library/library.info' % activity_base)
+                    is_activity = False
+                except:
+                    raise RuntimeError ("not activity or library")
             if is_activity:
                 cp = actutils.activity_info_from_zipfile(zf)
                 SECTION = 'Activity'
-- 
1.7.4.4