mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
334: Renamed Command.__multivalue() helper method to Command.dispatch()
This commit is contained in:
parent
1125d420bd
commit
4215da30ad
@ -105,7 +105,7 @@ class Param(plugable.ReadOnly):
|
|||||||
self.rules = (type_.validate,) + rules
|
self.rules = (type_.validate,) + rules
|
||||||
lock(self)
|
lock(self)
|
||||||
|
|
||||||
def __multivalue(self, value, scalar):
|
def __dispatch(self, value, scalar):
|
||||||
if self.multivalue:
|
if self.multivalue:
|
||||||
if type(value) in (tuple, list):
|
if type(value) in (tuple, list):
|
||||||
if len(value) == 0:
|
if len(value) == 0:
|
||||||
@ -142,7 +142,7 @@ class Param(plugable.ReadOnly):
|
|||||||
"""
|
"""
|
||||||
if self.__normalize is None:
|
if self.__normalize is None:
|
||||||
return value
|
return value
|
||||||
return self.__multivalue(value, self.__normalize_scalar)
|
return self.__dispatch(value, self.__normalize_scalar)
|
||||||
|
|
||||||
def __convert_scalar(self, value, index=None):
|
def __convert_scalar(self, value, index=None):
|
||||||
if value is None:
|
if value is None:
|
||||||
@ -155,7 +155,7 @@ class Param(plugable.ReadOnly):
|
|||||||
return converted
|
return converted
|
||||||
|
|
||||||
def convert(self, value):
|
def convert(self, value):
|
||||||
return self.__multivalue(value, self.__convert_scalar)
|
return self.__dispatch(value, self.__convert_scalar)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user