diff options
author | npmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56> | 2007-12-20 17:52:00 +0000 |
---|---|---|
committer | npmccallum <npmccallum@c587cffe-e639-0410-9787-d7902ae8ed56> | 2007-12-20 17:52:00 +0000 |
commit | 007de84b6eb0b984af8716a7e9e6b838de7775ba (patch) | |
tree | b98cdcb02029d0b82528103edc1efd27da4dfaa4 | |
parent | 9e5ed84d74f18c08de029bc7edcc29cb28d99284 (diff) | |
download | libproxy-007de84b6eb0b984af8716a7e9e6b838de7775ba.tar.gz |
fix python bindings: px_proxy_factory_get_proxy() -> px_proxy_factory_get_proxies()
git-svn-id: http://libproxy.googlecode.com/svn/trunk@123 c587cffe-e639-0410-9787-d7902ae8ed56
-rw-r--r-- | src/bindings/python/libproxy.py | 6 |
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)) |