GTG

fix backend rtm to work with liblarch

Bug #635046 reported by Luca Invernizzi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GTG
Fix Released
Critical
Marcos Lenharo

Bug Description

ception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.6/dist-packages/GTG/core/datastore.py", line 603, in __start_get_tasks
    self.backend.start_get_tasks()
  File "/usr/local/lib/python2.6/dist-packages/GTG/tools/interruptible.py", line 45, in new
    return fn(*args)
  File "/usr/local/lib/python2.6/dist-packages/GTG/backends/periodicimportbackend.py", line 81, in start_get_tasks
    self._start_get_tasks()
  File "/usr/local/lib/python2.6/dist-packages/GTG/backends/periodicimportbackend.py", line 101, in _start_get_tasks
    self.do_periodic_import()
  File "/usr/local/lib/python2.6/dist-packages/GTG/backends/backend_rtm.py", line 185, in do_periodic_import
    self._process_rtm_task(rtm_task_id)
  File "/usr/local/lib/python2.6/dist-packages/GTG/backends/backend_rtm.py", line 369, in _process_rtm_task
    self._populate_task(task, rtm_task)
  File "/usr/local/lib/python2.6/dist-packages/GTG/backends/backend_rtm.py", line 428, in _populate_task
    self.datastore.get_all_tags()]
  File "/usr/local/lib/python2.6/dist-packages/GTG/core/datastore.py", line 815, in __getattr__
    return self.datastore.requester.get_all_tags
AttributeError: 'Requester' object has no attribute 'get_all_tags'

Changed in gtg:
milestone: none → 0.3
Izidor Matušov (izidor)
tags: added: backends rtm
Revision history for this message
Marcos Lenharo (lenharo-h) wrote :

Hi,

I didn´t take a long look but following patch seems to fix the problem. What do you think?
=== modified file 'GTG/core/requester.py'
--- GTG/core/requester.py 2011-08-16 14:14:05 +0000
+++ GTG/core/requester.py 2011-09-06 04:00:43 +0000
@@ -187,6 +187,10 @@
         l.sort(cmp=lambda x, y: cmp(x.lower(),y.lower()))
         return l

+ def get_all_tags(self):
+ tags=self.get_used_tags()
+ return set([self.get_tag(tag) for tag in tags])
+
     ############## Backends #######################
     ###############################################

Izidor Matušov (izidor)
Changed in gtg:
milestone: 0.3 → 0.2.9
Revision history for this message
Izidor Matušov (izidor) wrote :

Marcos, thanks for the patch. It was applied in rev 999. Now RTM backend works! (at least the basic operations :-)

Changed in gtg:
assignee: Luca Invernizzi (invernizzi) → Marcos Lenharo (lenharo-h)
status: Triaged → Fix Committed
Izidor Matušov (izidor)
Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.