[orca/gnome-3-6] Use subprocess.Popen() instead of the deprecated os.popen()



commit 7e1dafdb96e960a4c84a3b48f39792fe62f77a16
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sun Oct 21 16:20:10 2012 +0000

    Use subprocess.Popen() instead of the deprecated os.popen()

 src/orca/orca_bin.py.in |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/orca_bin.py.in b/src/orca/orca_bin.py.in
index ce046ab..a736b59 100644
--- a/src/orca/orca_bin.py.in
+++ b/src/orca/orca_bin.py.in
@@ -30,6 +30,7 @@ __license__   = "LGPL"
 import argparse
 import os
 import signal
+import subprocess
 import sys
 import time
 
@@ -249,7 +250,9 @@ def inGraphicalDesktop():
 def otherOrcas():
     """Returns the pid of any other instances of Orca owned by this user."""
 
-    openFile = os.popen('pgrep -u %s orca' % os.getuid())
+    openFile = subprocess.Popen('pgrep -u %s orca' % os.getuid(),
+                                shell=True,
+                                stdout=subprocess.PIPE).stdout
     pids = openFile.read()
     openFile.close()
     orcas = [int(p) for p in pids.split()]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]