예제 #1
0
    def __init__(self, resource_type, *args, **kw):
        super(BasicSession, self).__init__(*args, **kw)

        if resource_type == 'onem2m':
            self.cinType = Cin
        else:
            raise DBError('no valid type: %s' % type)
 def _filter_latest(collection):
     if not collection:
         raise DBError("ContentInstance collection is empty")
     return collection[-1]