1 |
neurogeek 09/03/01 09:30:18 |
2 |
|
3 |
Added: pyxdg-subprocess.patch |
4 |
Log: |
5 |
Revision bump. Fixes bug #246997. Removed old version |
6 |
(Portage version: 2.2_rc20/cvs/Linux 2.6.27-gentoo-r7 i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-python/pyxdg/files/pyxdg-subprocess.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/pyxdg/files/pyxdg-subprocess.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/pyxdg/files/pyxdg-subprocess.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: pyxdg-subprocess.patch |
15 |
=================================================================== |
16 |
#Patch sent to upstream on March 1st, 2009 |
17 |
#Jesus Rivero (Neurogeek) |
18 |
#Replaced deprecated os.popen3 for subprocess |
19 |
|
20 |
diff -uNr xdg.orig/Menu.py xdg/Menu.py |
21 |
--- xdg.orig/Menu.py 2009-03-01 04:34:38.000000000 -0430 |
22 |
+++ xdg/Menu.py 2009-03-01 04:41:27.000000000 -0430 |
23 |
@@ -12,6 +12,7 @@ |
24 |
|
25 |
import xdg.Locale |
26 |
import xdg.Config |
27 |
+from subprocess import Popen, PIPE |
28 |
|
29 |
ELEMENT_NODE = xml.dom.Node.ELEMENT_NODE |
30 |
|
31 |
@@ -841,13 +842,16 @@ |
32 |
return m |
33 |
|
34 |
def __parseKDELegacyDirs(filename, parent): |
35 |
- f=os.popen3("kde-config --path apps") |
36 |
- output = f[1].readlines() |
37 |
try: |
38 |
- for dir in output[0].split(":"): |
39 |
- __parseLegacyDir(dir,"kde", filename, parent) |
40 |
- except IndexError: |
41 |
- pass |
42 |
+ f=Popen("kde-config --path apps", shell=True, stdout=PIPE).stdout |
43 |
+ output = f.readlines() |
44 |
+ try: |
45 |
+ for dir in output[0].split(":"): |
46 |
+ __parseLegacyDir(dir,"kde", filename, parent) |
47 |
+ except IndexError: |
48 |
+ pass |
49 |
+ except: |
50 |
+ raise Exception, "kde-config failed" |
51 |
|
52 |
# remove duplicate entries from a list |
53 |
def __removeDuplicates(list): |