hi

I have a function that runs ok in a fedora 12 machine but crashes in a lenny 
machine. It is an ajax function (I did not write it) so no traceback. The only 
difference between the two machines is that fedora has python 2.6 whereas lenny 
has 2.5 - so can anyone tell me if there is anything python 2.6 specific about 
the code below:

def allaccounts(request):
        filter_params = request.GET.get("head") or None
        filter_qs = 
Account.objects.filter(head=filter_params).values_list("id", "name")
        edit_url = lambda x: reverse("editaccount", kwargs={"id": x["id"]})
        
        eval_filter_qs = map(lambda x: dict(zip(("id", "text"), x)), 
list(filter_qs))
        map(lambda x: x.update({"attrs": {"href": edit_url(x), 
                                                                          
"remote": True, 
                                                                          "id": 
unicode(x["id"]),
                                                                          }}), 
eval_filter_qs)
        serialized_output = json.dumps(eval_filter_qs)
        return HttpResponse(serialized_output, mimetype="application/json")
-- 
Regards
Kenneth Gonsalves
Senior Associate
NRC-FOSS at AU-KBC
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to