Backend initialization too early, causes --help to except if no backend found

Bug #982920 reported by Sigurd Schneider
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
disper
Fix Released
Medium
Unassigned

Bug Description

Desired behaviour:
disper --help prints help and exits cleanly even if no backend is available

Observed behaviour:
disper --help excepts if no backend is available.

Propsed fix:
Delay backend initialization until switch has checked for --help arguments. See attached patch for details. The patch seems to work fine on my system.

More information:
The problem showed up when remaking disper.1.in: help2man wants to call disper, but fails because in the build environment no backend is available. Maybe there is a more generic way to get disper to print help even if no backend is available.

Revision history for this message
Sigurd Schneider (sigurdschneider) wrote :
Revision history for this message
wvengen (wvengen) wrote :

Hi Sigurd, thanks for the bug report and the patch!
Your patch would work fine, but I'd like people to be able to user disper.switch_primary() directly as well, and then self.switcher would not yet be available. The issue is very much a valid one!

Changed in disper:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Sigurd Schneider (sigurdschneider) wrote :

I did not notice the dependency on switch_primary - so the patch is too simple. Anyway, thanks for taking the issue into consideration!

wvengen (wvengen)
Changed in disper:
milestone: none → 0.3.1
status: Confirmed → Fix Committed
Changed in disper:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
wvengen (wvengen) wrote :

would mind checking current bzr trunk works?

Revision history for this message
Sigurd Schneider (sigurdschneider) wrote :

That was fast, thanks! disper --help works without available backend, and switching displays works also works fine. (revno 115)

Revision history for this message
wvengen (wvengen) wrote :

Thanks for checking!

wvengen (wvengen)
Changed in disper:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.