diff options
| author | Will Thompson <will.thompson@collabora.co.uk> | 2012-11-13 17:13:43 +0000 |
|---|---|---|
| committer | Will Thompson <will.thompson@collabora.co.uk> | 2012-12-06 17:52:29 +0000 |
| commit | 19b535ebbacf6cc20c0c3fe82cf51815e391f362 (patch) | |
| tree | 36887acc60e79d4539347454094916c4b4fc9d27 /tests | |
| parent | 13470c3c4f1602190bcf427911ceb6bb784d9cda (diff) | |
gabbletest: exit if we can't connect to the bus
Previously, if the bus wasn't there (perhaps I killed it when trying and
failing to ^C the test suite?) the test would just sit there forever
after the unhandled exception made its way up to the mainloop.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/twisted/gabbletest.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/twisted/gabbletest.py b/tests/twisted/gabbletest.py index 83cfd5855..838ba7892 100644 --- a/tests/twisted/gabbletest.py +++ b/tests/twisted/gabbletest.py @@ -561,7 +561,11 @@ def exec_test_deferred(fun, params, protocol=None, timeout=None, if sys.stdout.isatty() or 'CHECK_FORCE_COLOR' in os.environ: colourer = servicetest.install_colourer() - bus = dbus.SessionBus() + try: + bus = dbus.SessionBus() + except dbus.exceptions.DBusException as e: + print e + os._exit(1) queue = servicetest.IteratingEventQueue(timeout) queue.verbose = ( |
