summaryrefslogtreecommitdiffstats
path: root/ipalib/frontend.py
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2009-06-16 13:38:20 +0200
committerRob Crittenden <rcritten@redhat.com>2009-07-02 13:33:01 -0400
commit8c7883364ca3c73c9e2c503428495a4405b44e39 (patch)
tree7f75ba6e344e43f631fa7b25014ab9165322e824 /ipalib/frontend.py
parentebdebe802dd74c9df82f87774bb3f5d9f6cbdee6 (diff)
downloadfreeipa-8c7883364ca3c73c9e2c503428495a4405b44e39.tar.gz
freeipa-8c7883364ca3c73c9e2c503428495a4405b44e39.tar.xz
freeipa-8c7883364ca3c73c9e2c503428495a4405b44e39.zip
Remove use_ldap2 constant.
Diffstat (limited to 'ipalib/frontend.py')
-rw-r--r--ipalib/frontend.py22
1 files changed, 7 insertions, 15 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index aca350a49..2a5c5311e 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -473,21 +473,13 @@ class Command(HasParam):
return dict(self.__attributes_2_entry(kw))
def __attributes_2_entry(self, kw):
- if self.api.env.use_ldap2:
- for name in self.params:
- if self.params[name].attribute and name in kw:
- value = kw[name]
- if isinstance(value, tuple):
- yield (name, [v for v in value])
- else:
- yield (name, kw[name])
- else:
- for name in self.params:
- if self.params[name].attribute and name in kw:
- if type(kw[name]) is tuple:
- yield (name, [str(value) for value in kw[name]])
- else:
- yield (name, str(kw[name]))
+ for name in self.params:
+ if self.params[name].attribute and name in kw:
+ value = kw[name]
+ if isinstance(value, tuple):
+ yield (name, [v for v in value])
+ else:
+ yield (name, kw[name])
def params_2_args_options(self, **params):
"""