summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornpmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56>2007-12-20 17:52:00 +0000
committernpmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56>2007-12-20 17:52:00 +0000
commitfda23dd049cd04996f2093dd8b696ce8a65acfc1 (patch)
treeb98cdcb02029d0b82528103edc1efd27da4dfaa4
parent895bc2875eb83d4223e00169d2f52f29c6978755 (diff)
downloadlibproxy-git-fda23dd049cd04996f2093dd8b696ce8a65acfc1.tar.gz
fix python bindings: px_proxy_factory_get_proxy() -> px_proxy_factory_get_proxies()
-rw-r--r--src/bindings/python/libproxy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bindings/python/libproxy.py b/src/bindings/python/libproxy.py
index e92b0eb..32658df 100644
--- a/src/bindings/python/libproxy.py
+++ b/src/bindings/python/libproxy.py
@@ -37,7 +37,7 @@ if not _libpython:
if not ctypes.util.find_library("proxy"):
raise ImportError, "Unable to import libproxy!?!?"
_libproxy = ctypes.cdll.LoadLibrary(ctypes.util.find_library("proxy"))
-_libproxy.px_proxy_factory_get_proxy.restype = ctypes.POINTER(ctypes.c_void_p)
+_libproxy.px_proxy_factory_get_proxies.restype = ctypes.POINTER(ctypes.c_void_p)
class ProxyFactory(object):
"""A ProxyFactory object is used to provide potential proxies to use
@@ -64,14 +64,14 @@ class ProxyFactory(object):
def __init__(self):
self._pf = _libproxy.px_proxy_factory_new()
- def getProxy(self, url):
+ def getProxies(self, url):
"""Given a URL, returns a list of proxies in priority order to be used
to reach that URL."""
if type(url) != str:
raise TypeError, "url must be a string!"
proxies = []
- array = _libproxy.px_proxy_factory_get_proxy(self._pf, url)
+ array = _libproxy.px_proxy_factory_get_proxies(self._pf, url)
i=0
while array[i]:
proxies.append(str(ctypes.cast(array[i], ctypes.c_char_p).value))