diff options
Diffstat (limited to 'ipalib/constants.py')
-rw-r--r-- | ipalib/constants.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ipalib/constants.py b/ipalib/constants.py index 7e562b53..45c9f278 100644 --- a/ipalib/constants.py +++ b/ipalib/constants.py @@ -19,9 +19,21 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -All constants centralized in one file. +All constants centralised in one file. """ +# The parameter system treats all these values as None: +NULLS = (None, '', u'', tuple(), []) + +# Standard format for TypeError message: +TYPE_ERROR = '%s: need a %r; got %r (which is a %r)' + +# Stardard format for TypeError message when a callable is expected: +CALLABLE_ERROR = '%s: need a callable; got %r (which is a %r)' + +# Standard format for StandardError message when overriding an attribute: +OVERRIDE_ERROR = 'cannot override %s existing value %r with %r' + # Used for a tab (or indentation level) when formatting for CLI: CLI_TAB = ' ' # Two spaces |