SOURCES: quodlibet-subprocess.patch (NEW) - fix building with python 2.6 (f...

wiget wiget at pld-linux.org
Sun Nov 2 18:00:20 CET 2008


Author: wiget                        Date: Sun Nov  2 17:00:20 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix building with python 2.6 (from quodlibet issue #27)

---- Files affected:
SOURCES:
   quodlibet-subprocess.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/quodlibet-subprocess.patch
diff -u /dev/null SOURCES/quodlibet-subprocess.patch:1.1
--- /dev/null	Sun Nov  2 18:00:20 2008
+++ SOURCES/quodlibet-subprocess.patch	Sun Nov  2 18:00:14 2008
@@ -0,0 +1,27 @@
+Index: quodlibet/gdist/core.py
+===================================================================
+--- quodlibet/gdist/core.py	(revision 4331)
++++ quodlibet/gdist/core.py	(working copy)
+@@ -10,7 +10,7 @@
+ This module exists to avoid circular imports within gdist.
+ """
+ 
+-import os
++import os, subprocess
+ 
+ from distutils.core import Command
+ 
+@@ -26,8 +26,11 @@
+         self.po_directory = self.distribution.po_directory
+ 
+     def capture(self, args):
+-        write, read = os.popen2(args, mode="r")
+-        return read.read()
++        p = subprocess.Popen(args, stdout=subprocess.PIPE)
++        ret = p.wait()
++        if ret != 0:
++            raise SystemExit("External program %s exited with error %d." % (args[0], ret))
++        return p.stdout.read()
+ 
+     def check_po(self):
+         """Exit if translation is needed and not available"""
================================================================


More information about the pld-cvs-commit mailing list