summaryrefslogtreecommitdiffstats
path: root/server/config/SSSDConfig.py
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-12-09 06:51:01 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-12-09 10:05:18 -0500
commitaa83edba323ae398f89612afeb2f35566c6f7a5c (patch)
tree7b045a85954118c68d833c03a89696f682d09de1 /server/config/SSSDConfig.py
parentfb900c6ed1680f0fd9f0df6645c36e169ba756d4 (diff)
downloadsssd-aa83edba323ae398f89612afeb2f35566c6f7a5c.tar.gz
sssd-aa83edba323ae398f89612afeb2f35566c6f7a5c.tar.xz
sssd-aa83edba323ae398f89612afeb2f35566c6f7a5c.zip
SSSDConfig API: fix deactivate_domain()
deactivate_domain() would crash if it attempted to deactivate an already-inactive domain
Diffstat (limited to 'server/config/SSSDConfig.py')
-rw-r--r--server/config/SSSDConfig.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/config/SSSDConfig.py b/server/config/SSSDConfig.py
index 3a9ab4b4e..f00824d59 100644
--- a/server/config/SSSDConfig.py
+++ b/server/config/SSSDConfig.py
@@ -1343,8 +1343,9 @@ class SSSDConfig(SSSDChangeConf):
if domain_dict.has_key(''):
del domain_dict['']
- # Add a new key for the domain being activated
- del domain_dict[name]
+ # Remove the unwanted domain from the lest
+ if domain_dict.has_key(name):
+ del domain_dict[name]
# Write out the joined keys
self.set('sssd','domains', ", ".join(domain_dict.keys()))