From 8c7883364ca3c73c9e2c503428495a4405b44e39 Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Tue, 16 Jun 2009 13:38:20 +0200 Subject: Remove use_ldap2 constant. --- ipalib/frontend.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'ipalib/frontend.py') diff --git a/ipalib/frontend.py b/ipalib/frontend.py index aca350a4..2a5c5311 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): """ -- cgit