~ubuntu-branches/ubuntu/wily/lubuntu-software-center/wily

« back to all changes in this revision

Viewing changes to debian/patches/91_choosed_category_fix.patch

  • Committer: Package Import Robot
  • Author(s): Julien Lavergne
  • Date: 2012-03-09 14:21:53 UTC
  • Revision ID: package-import@ubuntu.com-20120309142153-0fcs9hy8yonx9me1
Tags: 0.0.4-0ubuntu3
* debian/patches:
 - 91_choosed_category_fix.patch: From upstream, fix crashed with
   AttributeError in get_func() (LP: #926266)
 - 92_local_tmp_variable.patch: From upstream, fix crashed with
   UnboundLocalError in getdeps() (LP: #942944)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
upstream bzr rev 121 : http://bazaar.launchpad.net/~lubuntu-software-center-team/lubuntu-software-center/lubuntu-software-center-trunk/revision/121
 
2
Index: lubuntu-software-center-0.0.4/src/threadingops.py
 
3
===================================================================
 
4
--- lubuntu-software-center-0.0.4.orig/src/threadingops.py      2012-02-10 20:27:50.000000000 +0100
 
5
+++ lubuntu-software-center-0.0.4/src/threadingops.py   2012-03-04 14:09:54.000000000 +0100
 
6
@@ -105,14 +105,22 @@
 
7
         return items[0]
 
8
 
 
9
 def getdeps(pkg):
 
10
+    tmp = ""
 
11
     for item in cursor.execute("SELECT deps FROM packages WHERE pkg_name='%s'" % pkg):
 
12
         tmp = item[0]
 
13
-    return tmp.split(";")
 
14
+    if tmp == "":
 
15
+        return []
 
16
+    else:
 
17
+        return tmp.split(";")
 
18
 
 
19
 def getrecs(pkg):
 
20
+    tmp = ""
 
21
     for item in cursor.execute("SELECT recs FROM packages WHERE pkg_name='%s'" % pkg):
 
22
         tmp = item[0]
 
23
-    return tmp.split(";")
 
24
+    if tmp == "":
 
25
+        return []
 
26
+    else:
 
27
+        return tmp.split(";")
 
28
 
 
29
 def download_screenshot(pkg, path, image, button):
 
30
     if os.path.isfile(os.path.join("/usr/lib/lubuntu-software-center/lubuntu-software-center-download-scrot")):