Beispiel #1
0
 def set_data(self, data):
     try:
         return AbstractBlob.set_data(self, self.pack(data))
     except:
         import sys
         print >> sys.stderr, 'Error pickling %r: %s' % (self,
                                                         repr(data)[:200])
         print >> sys.stderr, '  %s' % type(data)
         raise
Beispiel #2
0
    def set_data(self, data):
        try:
            return AbstractBlob.set_data(self, self.pack(data))
        except:
            import sys

            print >>sys.stderr, "Error pickling %r: %s" % (self, repr(data)[:200])
            print >>sys.stderr, "  %s" % type(data)
            raise
Beispiel #3
0
    def get_data(self):
        try:
            retval = self.unpack(AbstractBlob.get_data(self))
            return retval
        except Exception, e:
            import traceback
            traceback.print_exc()

            log.error('Could not unpickle %s', type(self).__name__)
            self.set_data(to_primitive(self.fallback()))
            return self.get_data()
Beispiel #4
0
    def get_data(self):
        try:
            retval = self.unpack(AbstractBlob.get_data(self))
            return retval
        except Exception, e:
            import traceback

            traceback.print_exc()

            log.error("Could not unpickle %s", type(self).__name__)
            self.set_data(to_primitive(self.fallback()))
            return self.get_data()