From 6b055b435f93bf9b63ee9b3b2fdd6f082dacc07b Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Mon, 22 Dec 2008 17:29:11 -0700 Subject: Cleaned up Env.__setattr__() and Env.__setitem__() a bit updated their unit tests --- ipalib/constants.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ipalib/constants.py') diff --git a/ipalib/constants.py b/ipalib/constants.py index ef7de44c..c74808d6 100644 --- a/ipalib/constants.py +++ b/ipalib/constants.py @@ -32,7 +32,12 @@ TYPE_ERROR = '%s: need a %r; got %r (which is a %r)' 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 value %r with %r' +OVERRIDE_ERROR = 'cannot override %s.%s value %r with %r' + +# Standard format for AttributeError message when a read-only attribute is +# already locked: +LOCK_ERROR = 'locked: cannot set %s.%s to %r' +DEL_ERROR = 'locked: cannot set %s.%s to %r' # Used for a tab (or indentation level) when formatting for CLI: CLI_TAB = ' ' # Two spaces -- cgit