def safe_callback(wrapped, instance, args, kwargs): buffer, data_len = args[1:] data = ffi.string(buffer[0:data_len]) return _call_http_cb( wrapped, instance, (data, ), kwargs, self.name, self.allow_failure )
def __bytes__(self): return ffi.string(lib.http_method_str(self.value))
def description(self): """ A description for this error. """ return ffi.string(lib.http_errno_description(self.value)).decode('ascii')
def c_name(self): """ The name used by the underlying the library. """ return ffi.string(lib.http_errno_name(self.value)).decode('ascii')