Esempio n. 1
0
 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
     )
Esempio n. 2
0
 def __bytes__(self):
     return ffi.string(lib.http_method_str(self.value))
Esempio n. 3
0
 def description(self):
     """
     A description for this error.
     """
     return ffi.string(lib.http_errno_description(self.value)).decode('ascii')
Esempio n. 4
0
 def c_name(self):
     """
     The name used by the underlying the library.
     """
     return ffi.string(lib.http_errno_name(self.value)).decode('ascii')