mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-13 08:52:01 -05:00
Fix webUI command parameters error on Fedora 14.
This commit is contained in:
1 parent
671c070050
commit
e5ccddf446
1 file changed
+9
-1
@@ -1014,7 +1014,7 @@ class Int(Number):
|
|||||||
"""
|
"""
|
||||||
if type(value) in (int, long):
|
if type(value) in (int, long):
|
||||||
return value
|
return value
|
||||||
if type(value) is unicode:
|
if type(value) in (str, unicode):
|
||||||
# permit floating point strings
|
# permit floating point strings
|
||||||
if value.find(u'.') >= 0:
|
if value.find(u'.') >= 0:
|
||||||
try:
|
try:
|
||||||
@@ -1247,6 +1247,14 @@ class Str(Data):
|
|||||||
"""
|
"""
|
||||||
if type(value) is self.type:
|
if type(value) is self.type:
|
||||||
return value
|
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):
|
if type(value) in (int, float):
|
||||||
return self.type(value)
|
return self.type(value)
|
||||||
if type(value) in (tuple, list):
|
if type(value) in (tuple, list):
|
||||||
|
|||||||
Reference in new issue
Block a user