Autopilot Eventually matcher gives an obscure message inside the Eventually matcher

Bug #1206805 reported by Thomi Richards on 2013-07-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopilot (Ubuntu)

Bug Description

The Eventually matcher calls into the DBus interface. If the DBus backend died, we print a stack trace, instead of raising a custom exception. The stack trace is:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/unity8/indicators_client/tests/", line 85, in test_auto_bright_switch
    self.assertThat(auto_brightness.checked, Eventually(NotEquals(old_ab_value)))
  File "/usr/lib/python2.7/dist-packages/testtools/", line 406, in assertThat
    mismatch = matcher.match(matchee)
  File "/usr/lib/python2.7/dist-packages/autopilot/matchers/", line 109, in match
    wait_fun(self.matcher, self.timeout)
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/", line 180, in wait_for
    _, new_state = self.parent.get_new_state()
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/", line 490, in get_new_state
    return self.get_state_by_path(self.get_class_query_string())[0]
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/", line 479, in get_state_by_path
    return cls._Backend.introspection_iface.GetState(piece)
  File "/usr/lib/python2.7/dist-packages/dbus/", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/", line 145, in __call__
  File "/usr/lib/python2.7/dist-packages/dbus/", line 651, in call_blocking
    message, timeout)

We should catch this and raise a better exception instead.

Related branches

Julien Funk (jaboing) on 2015-06-01
Changed in autopilot:
importance: Critical → High
Changed in autopilot:
assignee: Thomi Richards (thomir) → nobody
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:autopilot at revision 558, scheduled for release in autopilot, milestone 1.4

Changed in autopilot:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers