Non-existent style at command line crashes program

Bug #192321 reported by Nathan Haines
2
Affects Status Importance Assigned to Milestone
PyRoom
Status tracked in Trunk
0.1
Fix Released
Undecided
Unassigned
Trunk
Fix Released
High
Unassigned

Bug Description

When one specifies a non-existent style on the command-line, for example with './pyroom --style=darkblue', pyroom crashes with a KeyError assertion. Pyroom sets a default style upon startup, and should therefore fall back to the default style if the specified style does not exist.

Tags: style

Related branches

Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

Thank you for your bug report. I can confirm the bug, the fix also works correctly. I think it would be a good idea to add on startup in the bottom label that the specified style does not exist and that it picked up the default style, so that people can undestand what happened.

Changed in pyroom:
importance: Undecided → High
Revision history for this message
Nathan Haines (nhaines) wrote :

Thank you for your comment, Jérôme. Indeed, I thought of this but did not persue it.

I have extended PyRoom to allow for a startup message to be appended to the default text, and have updated my branch to reflect this. I like the result and think it is stable, but I am not sure if this is how the feature should be developed. Surely something more robust would be better, but I thought this was the least invasive solution at this time.

Changed in pyroom:
status: New → Triaged
Revision history for this message
Bruno Bord (brunobord) wrote :

Nathan: your fix has been included in 'code-reorganise' branch. Cheers.

Changed in pyroom:
status: Triaged → Fix Released
Revision history for this message
Nathan Haines (nhaines) wrote :

This has been fixed in the 0.1 release, but hadn't shown up in trunk yet.

Revision history for this message
Nathan Haines (nhaines) wrote :

Fix from 0.1 was incorporated into trunk at revision 21 with the merging of Adam Rooke's branch.

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.