mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-28 18:01:23 -06:00
Fix webUI command parameters error on Fedora 14.
This commit is contained in:
parent
671c070050
commit
e5ccddf446
@ -1014,7 +1014,7 @@ class Int(Number):
|
||||
"""
|
||||
if type(value) in (int, long):
|
||||
return value
|
||||
if type(value) is unicode:
|
||||
if type(value) in (str, unicode):
|
||||
# permit floating point strings
|
||||
if value.find(u'.') >= 0:
|
||||
try:
|
||||
@ -1247,6 +1247,14 @@ class Str(Data):
|
||||
"""
|
||||
if type(value) is self.type:
|
||||
return value
|
||||
if type(value) is str:
|
||||
try:
|
||||
return value.decode('utf-8')
|
||||
except UnicodeDecodeError:
|
||||
raise ConversionError(
|
||||
name=self.name, index=index,
|
||||
error=ugettext(self.scalar_error)
|
||||
)
|
||||
if type(value) in (int, float):
|
||||
return self.type(value)
|
||||
if type(value) in (tuple, list):
|
||||
|
Loading…
Reference in New Issue
Block a user