From 15618beab6b22558933e650a416dcd038c7ffc8a Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 12 Sep 2013 14:10:20 +0200 Subject: [PATCH] Fix invalid assumption NSS initialization check in SSLTransport There code assumes that the `conn` in any Connection in the context is a ServerProxy. This might not always be the case: ldap2 uses a python-ldap connection here. --- ipalib/rpc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ipalib/rpc.py b/ipalib/rpc.py index 81e7aa35f..6d86f224b 100644 --- a/ipalib/rpc.py +++ b/ipalib/rpc.py @@ -303,7 +303,9 @@ class SSLTransport(LanguageAwareTransport): for value in context.__dict__.values(): if not isinstance(value, Connection): continue - if not isinstance(value.conn._ServerProxy__transport, SSLTransport): + if not isinstance( + getattr(value.conn, '_ServerProxy__transport', None), + SSLTransport): continue if hasattr(value.conn._ServerProxy__transport, 'dbdir') and \ value.conn._ServerProxy__transport.dbdir == dbdir: