Merge lp:~thomir-deactivatedaccount/autopilot/fix-input-stack into lp:autopilot

Proposed by Thomi Richards
Status: Merged
Approved by: Christopher Lee
Approved revision: 186
Merged at revision: 187
Proposed branch: lp:~thomir-deactivatedaccount/autopilot/fix-input-stack
Merge into: lp:autopilot
Diff against target: 12 lines (+2/-0)
1 file modified
autopilot/display/_X11.py (+2/-0)
To merge this branch: bzr merge lp:~thomir-deactivatedaccount/autopilot/fix-input-stack
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Christopher Lee (community) Approve
Review via email: mp+162138@code.launchpad.net

Commit message

Make the X11 display module fail to initialise if the display information cannot be retrieved.

Description of the change

This branch fixes the problem where autopilot picks the wrong (X11) display stack to get display resolution in the UInput input stack.

To post a comment you must log in.
Revision history for this message
Christopher Lee (veebers) wrote :

Looks good.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/display/_X11.py'
2--- autopilot/display/_X11.py 2013-04-23 04:15:54 +0000
3+++ autopilot/display/_X11.py 2013-05-02 16:01:31 +0000
4@@ -32,6 +32,8 @@
5 # no DISPlAY environment set in the package builder.
6 from gi.repository import Gdk
7 self._default_screen = Gdk.Screen.get_default()
8+ if self._default_screen is None:
9+ raise RuntimeError("Unable to determine default screen information")
10 self._blacklisted_drivers = ["NVIDIA"]
11
12 def get_num_screens(self):

Subscribers

People subscribed via source and target branches