← Back to team overview

gtg-user team mailing list archive

Using the dbus interface

 

Hi all,

I am playing with the dbus interface. I run in the following problem
when I what to get a taks list filtered by tag.

I use the method get_tasks_filtered:
If I put a empty tag list, I get a full array of task but If I put a tag
like this:

gtg.get_tasks_filtered(["tagname"],["Active"],False,False)

I found the following error:

org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call
last):
  File "/usr/lib/python2.6/site-packages/dbus/service.py", line 702, in
_message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/hmi/gtg/GTG/core/dbuswrapper.py", line 81, in
get_tasks_filtered
    tags, status, started_only, is_root)
  File "/hmi/gtg/GTG/core/dbuswrapper.py", line 73, in
get_task_ids_filtered
    tags, status, False, started_only, is_root)
  File "/hmi/gtg/GTG/core/requester.py", line 126, in get_tasks_list
    for tid in t.get_tasks():
AttributeError: 'dbus.String' object has no attribute 'get_tasks'


I check the requester.py I found that line 120-128
        @return: A list of task ids (tids).
        """
        l_tasks = []
        temp_list = []
        if tags:
            for t in tags :
                for tid in t.get_tasks():
                    if tid not in temp_list:
                        temp_list.append(tid)


For me is strange the call t.get_tasks(), because I understood 
that t is a string with the tag name.
Any help on this?

Zunbeltz




Follow ups