summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2013-04-10 00:04:54 -0700
committerPatrick Ohly <patrick.ohly@intel.com>2013-05-06 16:28:12 +0200
commit28835d448bd48346280d42dc6fa27b8c0306ab11 (patch)
tree123077b4e66f1fc543e8ae184bd8e7cb10da8274
parent6bc16878772d5959b7d4df8f2d3ecdfdea1ae05f (diff)
D-Bus testing: improve TestSessionAPIsDummy.testInteractivePassword
The invocation of killall was unnecessarily complex.
-rwxr-xr-xtest/test-dbus.py7
1 files 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)