After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 535747 - Do not assume orca_state.lastNonModifierKeyEvent is non-None
Do not assume orca_state.lastNonModifierKeyEvent is non-None
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: 2.24.0
Assigned To: Rich Burridge
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-30 12:54 UTC by Willie Walker
Modified: 2008-06-03 20:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Revision #1. (787 bytes, patch)
2008-05-30 15:55 UTC, Rich Burridge
committed Details | Review

Description Willie Walker 2008-05-30 12:54:48 UTC
There is at least one instance in the code that assumes orca_state.lastNonModifierKeyEvent has been set:

Traceback (most recent call last):
  • File "/usr/lib/python2.5/site-packages/orca/focus_tracking_presenter.py", line 630 in _processObjectEvent
    s.processObjectEvent(event)
  • File "/usr/lib/python2.5/site-packages/orca/script.py", line 319 in processObjectEvent
    self.listeners[key](event)   File "/usr/lib/python2.5/site-packages/orca/scripts/apps/gnome-screensaver-dialog.py", line 55, in onStateChanged     default.Script.onStateChanged(self, event)
  • File "/usr/lib/python2.5/site-packages/orca/default.py", line 3675 in onStateChanged
    keyString = orca_state.lastNonModifierKeyEvent.event_string
AttributeError: 'NoneType' object has no attribute 'event_string'

As seen by the above stack trace, this is not always the case, so we need to handle it appropriately.  See http://bugzilla.gnome.org/show_bug.cgi?id=530368#c16 for more info:
Comment 1 Rich Burridge 2008-05-30 15:55:06 UTC
Created attachment 111809 [details] [review]
Revision #1.

Patch committed. Moving to "[pending]".