diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2009-12-09 06:51:01 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-12-09 10:05:18 -0500 |
commit | aa83edba323ae398f89612afeb2f35566c6f7a5c (patch) | |
tree | 7b045a85954118c68d833c03a89696f682d09de1 /server/config/SSSDConfig.py | |
parent | fb900c6ed1680f0fd9f0df6645c36e169ba756d4 (diff) | |
download | sssd-aa83edba323ae398f89612afeb2f35566c6f7a5c.tar.gz sssd-aa83edba323ae398f89612afeb2f35566c6f7a5c.tar.bz2 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.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/config/SSSDConfig.py b/server/config/SSSDConfig.py index 3a9ab4b4..f00824d5 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())) |