gtg-user team mailing list archive
-
gtg-user team
-
Mailing list archive
-
Message #00192
Re: Using the dbus interface
Hi Zunbeltz,
This was a bug in the DBus interface. I corrected it in rev. 460. The tags
in the requester are not strings, they are tag object. That's why the dbus
interface should translate that (and it was not doing it, obviously).
Don't hesitate to report a bug next time you see something like this. Even
if you don't understand something, GTG should never never crashes and give
you a trace.
Thanks for the report,
Lionel
On Mon, 07 Dec 2009 10:44:52 +0100, Zunbeltz Izaola <zunbeltz@xxxxxxxxx>
wrote:
> 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
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~gtg-user
> Post to : gtg-user@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~gtg-user
> More help : https://help.launchpad.net/ListHelp
References