diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2013-04-10 00:04:54 -0700 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2013-05-06 16:28:12 +0200 |
commit | 28835d448bd48346280d42dc6fa27b8c0306ab11 (patch) | |
tree | 123077b4e66f1fc543e8ae184bd8e7cb10da8274 | |
parent | 6bc16878772d5959b7d4df8f2d3ecdfdea1ae05f (diff) |
D-Bus testing: improve TestSessionAPIsDummy.testInteractivePassword
The invocation of killall was unnecessarily complex.
-rwxr-xr-x | test/test-dbus.py | 7 |
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) |