aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-06-30 00:11:12 +0200
committerJonathan Weth <git@jonathanweth.de>2021-06-30 10:25:26 +0200
commit4ae10b669819fb665748de796515218dcdb47d47 (patch)
tree4d19970c11c7d3f9c0a0c0459d7949c9a7ddb45a
parent4c5b30bd253dd0230afffb29c6daa6c338c2749c (diff)
downloadRWA.Support.SessionService-4ae10b669819fb665748de796515218dcdb47d47.tar.gz
RWA.Support.SessionService-4ae10b669819fb665748de796515218dcdb47d47.tar.bz2
RWA.Support.SessionService-4ae10b669819fb665748de796515218dcdb47d47.zip
test_client.py: Catch D-Bus exception on startup
-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()