Skip to content

Commit

Permalink
Log while trying to get initial D-Bus connection
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Jul 21, 2023
1 parent 06f3fbd commit 815bba0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/monitor_dbus_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,11 @@ def _monitor(service, manager, manager_interfaces):
try:
_TOP_OBJECT = bus.get_object(service, _TOP_OBJECT_PATH)
except: # pylint: disable=bare-except
time.sleep(1)
print(
f'Failed to get top object "{_TOP_OBJECT_PATH}" for '
f'service "{_SERVICE}". Retrying.'
)
time.sleep(4)
else:
break

Expand All @@ -316,7 +320,12 @@ def _monitor(service, manager, manager_interfaces):
try:
_MO = _MAKE_MO()
except: # pylint: disable=bare-except
time.sleep(1)
print(
"Failed to get initial GetManagedObjects result for "
f'service "{_SERVICE}" and top object '
f'"{_TOP_OBJECT_PATH}". Retrying.'
)
time.sleep(4)
else:
break

Expand Down

0 comments on commit 815bba0

Please sign in to comment.