summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/domainlevel.py
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2015-07-20 13:49:41 +0200
committerTomas Babej <tbabej@redhat.com>2015-07-20 13:53:21 +0200
commit37b1af9a7cea72f41ac468ab80259f39b0a7b3db (patch)
tree159e9c9fca7e95265823b5c0c2c60abd7ab0094d /ipalib/plugins/domainlevel.py
parentc6c84faecf5b7017c0d648d76ba0db4a2eba2f03 (diff)
downloadfreeipa-37b1af9a7cea72f41ac468ab80259f39b0a7b3db.tar.gz
freeipa-37b1af9a7cea72f41ac468ab80259f39b0a7b3db.tar.xz
freeipa-37b1af9a7cea72f41ac468ab80259f39b0a7b3db.zip
domainlevel: Fix incorrect initializations of InvalidDomainLevelError exceptions
Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipalib/plugins/domainlevel.py')
-rw-r--r--ipalib/plugins/domainlevel.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/domainlevel.py b/ipalib/plugins/domainlevel.py
index 64e383006..838a518e7 100644
--- a/ipalib/plugins/domainlevel.py
+++ b/ipalib/plugins/domainlevel.py
@@ -120,7 +120,7 @@ class domainlevel_set(Command):
# Domain level cannot be lowered
if int(desired_value) < int(current_value):
message = _("Domain Level cannot be lowered.")
- raise errors.InvalidDomainLevelError(message)
+ raise errors.InvalidDomainLevelError(reason=message)
# Check if every master supports the desired level
for master in get_master_entries(ldap, self.api):
@@ -130,7 +130,7 @@ class domainlevel_set(Command):
message = _("Domain Level cannot be raised to {0}, server {1} "
"does not support it."
.format(desired_value, master['cn'][0]))
- raise errors.InvalidDomainLevelError(message)
+ raise errors.InvalidDomainLevelError(reason=message)
current_entry.single_value['ipaDomainLevel'] = desired_value
ldap.update_entry(current_entry)