On Thursday, April 26, 2012 11:47:53 AM Ed Leafe wrote:
> On Apr 26, 2012, at 10:21 AM, John Fabiani wrote:
> >>> +                 pythonType = self._types[field_name,None]
> >> 
> >> AFAIK, this syntax is invalid and always return KeyError exception.
> >> The correct implementation should use dictionary class get() method
> >> instead.> 
> > Works here.  If you have a better solution please commit.
> 
>       No, I'll bet it doesn't "work here". Try this: add a debug line right 
after
> the 'except KeyError:' part of that construct, and see what you get:
> 
> try:
>     pythonType = self._types[field_name,None]
> except KeyError:
>     print "TYPE FAIL", field_name, field_name in self._types
>     pythonType = dabo.db.getDataType(type(field_val))
> 
>       If this prints True for any type fail, it meant that even though the 
> field
> name was present in self._types, it couldn't find it because you're looking
> for the key (field_name, None), and there are no keys that consist of such
> 2-tuples.
> 
>       I'll post the correction.
> 
> 
> -- Ed Leafe

Ok thanks 
Johnf

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/1400060.9ZbDLiBBRN@linux-12

Reply via email to