summaryrefslogtreecommitdiffstats
path: root/ipalib/backend.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2009-11-18 14:13:08 -0500
committerRob Crittenden <rcritten@redhat.com>2009-11-18 14:13:08 -0500
commit1e3ba09514088fa7e232ca05fe32efe6c5a33dfd (patch)
tree1e4a9d70a1b4e8a8d7e62b9f06393e4da4d64224 /ipalib/backend.py
parent55c62ac79af235b75f969434aba775c4a8c30274 (diff)
downloadfreeipa-1e3ba09514088fa7e232ca05fe32efe6c5a33dfd.tar.gz
freeipa-1e3ba09514088fa7e232ca05fe32efe6c5a33dfd.tar.xz
freeipa-1e3ba09514088fa7e232ca05fe32efe6c5a33dfd.zip
Add fail-safe so any kind of exception is handled in XML-RPC server.
If an exception is not handled here then the context isn't destroyed leaving at least an LDAP connection dangling. This means the next time this thread/process tries to handle a connection it will fail because a context already exists.
Diffstat (limited to 'ipalib/backend.py')
-rw-r--r--ipalib/backend.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipalib/backend.py b/ipalib/backend.py
index 7c964b799..2436ce052 100644
--- a/ipalib/backend.py
+++ b/ipalib/backend.py
@@ -123,6 +123,11 @@ class Executioner(Backend):
'non-public: %s: %s', e.__class__.__name__, str(e)
)
error = InternalError()
+ except Exception, e:
+ self.exception(
+ 'unhandled exception: %s: %s', e.__class__.__name__, str(e)
+ )
+ error = InternalError()
destroy_context()
if error is None:
return result