summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-12-21 22:39:55 -0500
committerRob Crittenden <rcritten@redhat.com>2011-01-10 10:27:23 -0500
commit0a79836082b897ebf734d9073583769cb276937c (patch)
tree3269cf575f989df3ba9b88f13e0be70982018ebf /ipalib/errors.py
parentc69f4d0fed05a355ae5b9168066ad0ad01eb6487 (diff)
downloadfreeipa-0a79836082b897ebf734d9073583769cb276937c.tar.gz
freeipa-0a79836082b897ebf734d9073583769cb276937c.tar.xz
freeipa-0a79836082b897ebf734d9073583769cb276937c.zip
Setting an empty set of target attributes should raise an exception.
It is possible to create an ACI with attributes and then try to set that to None via a mod command later. We need to catch this and raise an exception. If all attributes are set to None in an aci then the attr target is removed from the ACI. This could result in an illegal ACI if there are no other targets. Having no targets is a legal state, just not a legal final state. ticket 647
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index 62c42fea..2cafb010 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -1319,11 +1319,11 @@ class OnlyOneValueAllowed(ExecutionError):
class InvalidSyntax(ExecutionError):
"""
- **4208** Raised when trying to set more than one value to single-value attributes
+ **4208** Raised when an value does not match the required syntax
For example:
- >> raise OnlyOneValueAllowed(attr='ipahomesrootdir')
+ >> raise InvalidSyntax(attr='ipahomesrootdir')
Traceback (most recent call last):
...
InvalidSyntax: ipahomesrootdir: Invalid syntax