From 886e417fd76b25a28cde70be8de2851047ed0338 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 17 Jan 2011 16:23:53 -0500 Subject: Set the default Int maxvalue to the maximum XML-RPC can handle. Also handle marshalling errors thrown by xmlrpclib more gracefully. ticket 770 --- ipalib/parameters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ipalib/parameters.py') diff --git a/ipalib/parameters.py b/ipalib/parameters.py index 78eacde2..0d6c6902 100644 --- a/ipalib/parameters.py +++ b/ipalib/parameters.py @@ -109,6 +109,7 @@ from errors import PasswordMismatch from constants import NULLS, TYPE_ERROR, CALLABLE_ERROR from text import Gettext, FixMe import csv +from xmlrpclib import MAXINT class DefaultFrom(ReadOnly): @@ -1002,7 +1003,7 @@ class Int(Number): kwargs = Param.kwargs + ( ('minvalue', int, None), - ('maxvalue', int, None), + ('maxvalue', int, int(MAXINT)), ) def __init__(self, name, *rules, **kw): -- cgit