aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Weth <mail@jonathanweth.de>2021-06-30 08:25:45 +0000
committerJonathan Weth <mail@jonathanweth.de>2021-06-30 08:25:45 +0000
commit9960225e772363ab55b86fffbb2730860c00003b (patch)
tree4d19970c11c7d3f9c0a0c0459d7949c9a7ddb45a
parent4c5b30bd253dd0230afffb29c6daa6c338c2749c (diff)
parent4ae10b669819fb665748de796515218dcdb47d47 (diff)
downloadRWA.Support.SessionService-9960225e772363ab55b86fffbb2730860c00003b.tar.gz
RWA.Support.SessionService-9960225e772363ab55b86fffbb2730860c00003b.tar.bz2
RWA.Support.SessionService-9960225e772363ab55b86fffbb2730860c00003b.zip
Merge branch 'mr/catch-dbus-exception' into 'master'
test_client.py: Catch D-Bus exception on startup See merge request remotewebapp/rwa.support.sessionservice!9
-rwxr-xr-xtest_client.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test_client.py b/test_client.py
index ee49bae..72538c1 100755
--- a/test_client.py
+++ b/test_client.py
@@ -29,8 +29,12 @@
import click
import dbus
-bus = dbus.SessionBus()
-req = bus.get_object("org.ArcticaProject.RWASupportSessionService", "/RWASupportSessionService")
+try:
+ bus = dbus.SessionBus()
+ req = bus.get_object("org.ArcticaProject.RWASupportSessionService", "/RWASupportSessionService")
+except dbus.exceptions.DBusException:
+ click.echo("The D-Bus service isn't responding! Is it even started? Aborting ...")
+ exit(1)
@click.group()