summaryrefslogtreecommitdiffstats
path: root/ipapython/nsslib.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-08-21 10:40:50 +0200
committerPetr Viktorin <pviktori@redhat.com>2013-10-04 15:49:19 +0200
commit80886a50e6157e6a0b8f3f09523ba7d2c2b8001c (patch)
tree55428046ac04868b079242c73354bb8eadbdd870 /ipapython/nsslib.py
parentc813b8fbd39c700e25f591080a1e2d0d1645a173 (diff)
downloadfreeipa.git-80886a50e6157e6a0b8f3f09523ba7d2c2b8001c.tar.gz
freeipa.git-80886a50e6157e6a0b8f3f09523ba7d2c2b8001c.tar.xz
freeipa.git-80886a50e6157e6a0b8f3f09523ba7d2c2b8001c.zip
ipapython.nsslib: Name arguments to NSPRError
Previously NSPRError was given arguments in the wrong order. Fix this by naming the arguments.
Diffstat (limited to 'ipapython/nsslib.py')
-rw-r--r--ipapython/nsslib.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/ipapython/nsslib.py b/ipapython/nsslib.py
index fd74dcb7..d06b05fb 100644
--- a/ipapython/nsslib.py
+++ b/ipapython/nsslib.py
@@ -142,9 +142,10 @@ class NSSAddressFamilyFallback(object):
try:
addr_info = io.AddrInfo(host, family=self.family)
except Exception:
- raise NSPRError(error.PR_ADDRESS_NOT_SUPPORTED_ERROR,
- "Cannot resolve %s using family %s" % (host,
- io.addr_family_name(self.family)))
+ raise NSPRError(
+ error_code=error.PR_ADDRESS_NOT_SUPPORTED_ERROR,
+ error_message="Cannot resolve %s using family %s" % (host,
+ io.addr_family_name(self.family)))
for net_addr in addr_info:
root_logger.debug("Connecting: %s", net_addr)
@@ -160,8 +161,9 @@ class NSSAddressFamilyFallback(object):
root_logger.debug("Try to continue with next family...")
continue
- raise NSPRError(error.PR_ADDRESS_NOT_SUPPORTED_ERROR,
- "Could not connect to %s using any address" % host)
+ raise NSPRError(
+ error_code=error.PR_ADDRESS_NOT_SUPPORTED_ERROR,
+ error_message="Could not connect to %s using any address" % host)
class NSSConnection(httplib.HTTPConnection, NSSAddressFamilyFallback):