[Bugs] #1609 UNSP: sugar.datastore.datastore.find(): async mode broken

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Mon Dec 7 16:09:10 EST 2009


#1609: sugar.datastore.datastore.find(): async mode broken
------------------------------------------+---------------------------------
    Reporter:  sascha_silbe               |          Owner:  erikos                     
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  sugar-toolkit              |        Version:  Git as of bugdate          
    Severity:  Blocker                    |       Keywords:                             
Distribution:  Unspecified                |   Status_field:  New                        
------------------------------------------+---------------------------------
 {{{sugar.datastore.datastore.find()}}} leads the API consumer into
 believing it supports asynchronous operation by offering the reply_handler
 and error_handler parameters, but it breaks if those are used:

 {{{
 >>> sugar.datastore.datastore.find({'foo': 'bar'}, reply_handler=cb,
 error_handler=cb)
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/sugar/datastore/datastore.py", line 277, in find
     reply_handler, error_handler)
 TypeError: 'NoneType' object is not iterable
 >>>
 }}}

 This has been fixed during my data store access refactorings (#1197), but
 since those have not been merged it's still broken.
 How should we go forward on it? Three options come to my mind:

 1. Merge #1197 / #1198 (we're now more early in the release cycle).
 2. Backport this single change from #1197.
 3. Remove {{{reply_handler}}} and {{{error_handler}}} parameters to
 indicate asynchronous operation isn't supported.


 I'm marking this Blocker instead of just Major because I noticed it when I
 wanted to use asynchronous mode from within an activity.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1609>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list