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
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
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()
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()