[Fedora-i18n-bugs] [Bug 757889] [abrt] ibus-1.4.0-6.fc16: enginetreeview.py:176:set_engines:AttributeError: 'NoneType' object has no attribute 'name'

bugzilla at redhat.com bugzilla at redhat.com
Fri Dec 30 08:29:19 UTC 2011


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=757889

fujiwara <tfujiwar at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |MODIFIED

--- Comment #1 from fujiwara <tfujiwar at redhat.com> 2011-12-30 03:29:17 EST ---
(In reply to comment #0)
> :Traceback (most recent call last):
> :  File "/usr/share/ibus/setup/xkbsetup.py", line 338, in
> __button_system_keyboard_layout_add_cb
> :    self.__treeview_system_keyboard_layout.set_engines([engine])
> :  File "/usr/share/ibus/setup/enginetreeview.py", line 176, in set_engines
> :    e.name.startswith(ibus.DEFAULT_BRIDGE_ENGINE_NAME):
> :AttributeError: 'NoneType' object has no attribute 'name'
> :
> :Local variables in innermost frame:
> :self: <EngineTreeView object at 0x1937f00 (EngineTreeView at 0x1aac5a0)>
> :e: None
> :engines: [None]

I don't understand why the active engine could be null but I added the check
logic to avoid segv.

--- ibus-1.4.0/setup/xkbsetup.py.orig
+++ ibus-1.4.0/setup/xkbsetup.py
@@ -350,6 +350,9 @@ class XKBSetup(gobject.GObject):
     def __button_system_keyboard_layout_add_cb(self, button):
         engines = self.__treeview_system_keyboard_layout.get_engines()
         engine = self.__combobox_system_keyboard_layout.get_active_engine()
+        if engine == None:
+            return
+        # If engines[0] is the default dummy engine:
         if len(engines) > 0 and engines[0].layout == "default":
             self.__treeview_system_keyboard_layout.set_engines([engine])
         else:

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the i18n-bugs mailing list