[Sugar-devel] [PATCH Get Books] Port to Gtk3 SL #3681

Manuel Kaufmann humitos at gmail.com
Wed Jun 20 08:37:32 EDT 2012


On Wed, Jun 20, 2012 at 9:09 AM, Manuel Kaufmann <humitos at gmail.com> wrote:
>> It's like in all the other port :)
>
> I don't understand what you said here.
>
>  * Should I take a look at another port that uses DBus?
>  * Should I just replace the import and the rest will keep working?

This seems to be not like you said. I replaced "import dbus" by "from
gi.repository import DBus" and all the occurrences of "dbus" by "DBus"
but I'm getting an error:

Traceback (most recent call last):
  File "/home/humitos/sugar-jhbuild/install/bin/sugar-activity", line
154, in <module>
    main()
  File "/home/humitos/sugar-jhbuild/install/bin/sugar-activity", line
149, in main
    instance = create_activity_instance(activity_constructor, activity_handle)
  File "/home/humitos/sugar-jhbuild/install/bin/sugar-activity", line
36, in create_activity_instance
    activity = constructor(handle)
  File "/home/humitos/Activities/GetBooks.activity/GetIABooksActivity.py",
line 99, in __init__
    self._add_search_controls(toolbar_box.toolbar)
  File "/home/humitos/Activities/GetBooks.activity/GetIABooksActivity.py",
line 277, in _add_search_controls
    self._device_manager = devicemanager.DeviceManager()
  File "./devicemanager.py", line 40, in __init__
    self._bus = DBus.SystemBus()
  File "/usr/lib64/python2.7/site-packages/gi/module.py", line 243, in
__getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib64/python2.7/site-packages/gi/module.py", line 105, in
__getattr__
    self.__name__, name))
AttributeError: 'gi.repository.DBus' object has no attribute 'SystemBus'

Even more, Read and Browse (that are already ported to Gtk3) use
"import dbus" instead of "from gi.repository import DBus".

Can anybody help me with this?

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/


More information about the Sugar-devel mailing list