https://bugzilla.redhat.com/show_bug.cgi?id=1142458
--- Comment #9 from Mike FABIAN <mfabian(a)redhat.com> ---
(In reply to Stas Sergeev from comment #7)
> Or will bus.get_config() keep failing
> when it failed once?
IMHO it isn't failing more than once.
After a traceback, few seconds later everything works fine.
The purpose of my question was whether code as followed
has a reasonable chance to fix your problem or not:
# config module
for i in range(0,9):
self._config = self._bus.get_config ()
if self._config:
break
time.sleep(0.1)
if self._config:
self._config.connect ("value-changed",
self.config_value_changed_cb)
else:
print('Error: could not connect callback for config value
changes.')
Here I try to call self._bus.get_config () 10 times,
waiting 100 milliseconds after each call, breaking out
of the loop when the first call succeeds.
If it still doesn’t work after the 10th loop, i.e. after 1 second,
give up and print and error, but continue with ibus table without
the connection of the config callback.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug
https://bugzilla.redhat.com/token.cgi?t=6dnFi6A248&a=cc_unsubscribe