[ckan-dev] what is the Missing class used for?

Dave Caraway dave at fogmine.com
Fri Sep 6 21:26:29 UTC 2013


Hi everyone,

Can anyone explain where instances of the Missing class (an exception) in
ckan.lib.navl.dictization_functions.py should be propagated to? Right now
they are going uncaught, resulting in a server error for me. Wondering if I
should just catch them and add a message to the error object.

code snippet from ckan.lib.navl.dictization_functions.py:

class Missing(object):
    def __unicode__(self):
        raise Invalid(_('Missing value'))
    def __str__(self):
        raise Invalid(_('Missing value'))
    def __int__(self):
        raise Invalid(_('Missing value'))
    def __complex__(self):
        raise Invalid(_('Missing value'))
    def __long__(self):
        raise Invalid(_('Missing value'))
    def __float__(self):
        raise Invalid(_('Missing value'))
    def __oct__(self):
        raise Invalid(_('Missing value'))
    def __hex__(self):
        raise Invalid(_('Missing value'))
    def __nonzero__(self):
        return False


Thanks!
-Dave

-- 
Dave Caraway
Owner
Fog Mine
dave at fogmine.com
Cell: (937) 985-0867
Fax: (866) 238-3120
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130906/50764ab7/attachment.html>


More information about the ckan-dev mailing list