On Wed, Jul 1, 2009 at 3:10 AM, Xavier Cremaschi<[email protected]> wrote: > I tried an ugly modification : > if hasattr(item, attribute): > value = getattr(item, attribute) > if value == None: > value = " " > if isinstance(value, str) and not len(value): > value = " " #bugfix for empty name > if self.LetterDict and len(value): > if self.label_list.index((part, attribute)) == 0: > letter = value[0] >
"if self.LetterDict and len(value):" The len(value) part is not needed, because you already fixed it before. And if the value is None, the len(value) fails with a TypeError exception. I pushed a fix which should be enough: http://git.paroli-project.org/?p=paroli.git;a=commit;h=3af9f956337445dc3772038ba1eeeb8a4e33f406 Thanks for catching! Laszlo ps: Im wondering how people manages to add empty contacts and with value None(!). _______________________________________________ Openmoko community mailing list [email protected] http://lists.openmoko.org/mailman/listinfo/community

