Ejemplo n.º 1
0
    def __init__(self, *a, **kw):
        storage.__init__(self, *a, **kw)
        self.setdefault("__body__", None)

        # avoiding self._data because it adds as item instead of attr.
        self.__dict__["_data"] = []
        self.__dict__["extend"] = self._data.extend
Ejemplo n.º 2
0
    def __init__(self, *a, **kw):
        storage.__init__(self, *a, **kw)
        self.setdefault("__body__", None)

        # avoiding self._data because it adds as item instead of attr.
        self.__dict__["_data"] = []
        self.__dict__["extend"] = self._data.extend
Ejemplo n.º 3
0
    def __init__(self, *a, **kw):
        storage.__init__(self, *a, **kw)
        self.setdefault("__body__", None)

        # avoiding self._data because add it as self["_data"]
        self.__dict__["_data"] = []
        self.__dict__["extend"] = self._data.extend
Ejemplo n.º 4
0
 def __init__(self, sphinx_results=None, db_fetch=None):
     storage.__init__(self, 
         dict(time=0, total=0, total_found=0, error='', warning='', matches=[], words=[], ids=[]))
     if sphinx_results:
         self.update(sphinx_results)
     if self['warning']:
         print self['warning']
     if self['error']:
         raise self['error']
     if not db_fetch:
         db_fetch = DBFetch(None, '', getter=itemgetter('id'))
     db_fetch._FetchInternal(self)