Exemplo n.º 1
0
 def add_handle(self, handle):
     if not isinstance(handle, MockCurl):
         raise AssertionError("Only MockCurl objects are allowed")
     if handle in self._handle_list:
         # same error as real CurlMulti object
         raise pycurl.error("curl object already on this multi-stack")
     self._handle_list.append(handle)
Exemplo n.º 2
0
 def add_handle(self, handle):
     if not isinstance(handle, MockCurl):
         raise AssertionError("Only MockCurl objects are allowed")
     if handle in self._handle_list:
         # same error as real CurlMulti object
         raise pycurl.error("curl object already on this multi-stack")
     self._handle_list.append(handle)
Exemplo n.º 3
0
 def remove_handle(self, handle):
     if handle not in self._handle_list:
         # same error as real CurlMulti object
         raise pycurl.error("curl object not on this multi-stack")
     self._handle_list.remove(handle)
Exemplo n.º 4
0
 def remove_handle(self, handle):
     if handle not in self._handle_list:
         # same error as real CurlMulti object
         raise pycurl.error("curl object not on this multi-stack")
     self._handle_list.remove(handle)