summaryrefslogtreecommitdiffstats
path: root/ipapython
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-04-06 16:48:49 +0200
committerMartin Basti <mbasti@redhat.com>2016-05-12 11:18:40 +0200
commit93332bcf4dd0189b7136db7fe4f900fc04171d20 (patch)
treeda229b92e685a4e69a7df3a385ab5614bc205478 /ipapython
parentab2ebf489fa5afb57e5f49a8c025d555f583eb1a (diff)
downloadfreeipa-93332bcf4dd0189b7136db7fe4f900fc04171d20.tar.gz
freeipa-93332bcf4dd0189b7136db7fe4f900fc04171d20.tar.xz
freeipa-93332bcf4dd0189b7136db7fe4f900fc04171d20.zip
Remove unused variable and finally block in SchemaCache
Handling exceptions in python is expensive operation, removing of uneeded finally block is good for performance. Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipapython')
-rw-r--r--ipapython/ipaldap.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/ipapython/ipaldap.py b/ipapython/ipaldap.py
index 405f1ee2f..7e920e100 100644
--- a/ipapython/ipaldap.py
+++ b/ipapython/ipaldap.py
@@ -21,7 +21,6 @@
import time
import datetime
-import shutil
from decimal import Decimal
from copy import deepcopy
import contextlib
@@ -155,7 +154,6 @@ class SchemaCache(object):
If a connection is provided then it the credentials bound to it are
used. The connection is not closed when the request is done.
"""
- tmpdir = None
assert conn is not None
self.log.debug(
@@ -184,9 +182,6 @@ class SchemaCache(object):
# TODO: DS uses 'cn=schema', support for other server?
# raise a more appropriate exception
raise
- finally:
- if tmpdir:
- shutil.rmtree(tmpdir)
return ldap.schema.SubSchema(schema_entry[1])