From 28835d448bd48346280d42dc6fa27b8c0306ab11 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 10 Apr 2013 00:04:54 -0700 Subject: D-Bus testing: improve TestSessionAPIsDummy.testInteractivePassword The invocation of killall was unnecessarily complex. --- test/test-dbus.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test-dbus.py b/test/test-dbus.py index 076e8997..a98e186e 100755 --- a/test/test-dbus.py +++ b/test/test-dbus.py @@ -2790,8 +2790,11 @@ class TestSessionAPIsDummy(DBusUtil, unittest.TestCase): # dbus server will be blocked by gnome-keyring-ask dialog, so we kill it, and then # it can't get the password from gnome keyring and send info request for password def callback(): - kill = subprocess.Popen("sh -c 'killall -9 gnome-keyring-ask >/dev/null 2>&1'", shell=True) - kill.communicate() + kill = subprocess.Popen('killall -9 gnome-keyring-ask'.split(), + stdout=open('/dev/null', 'w'), + stderr=subprocess.STDOUT) + kill.wait() + # Kill again soon. return True timeout_handler = Timeout.addTimeout(1, callback) -- cgit v1.2.3