summaryrefslogtreecommitdiff
path: root/src/leap/config/leapsettings.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-06-14 04:18:30 +0900
committerkali <kali@leap.se>2013-06-14 04:18:30 +0900
commitda790dbcdaae5a11a65460e2d169833c5ee350b2 (patch)
tree6c7dcf0c83dd2345c47de93bce38221066efe6da /src/leap/config/leapsettings.py
parentb72db47a15b07843a82c8d5dbe762d5278d9af07 (diff)
parentc3fa54bc8628ba1618aba7b09a0daf458e798d3c (diff)
Merge remote-tracking branch 'chiiph/bug/dont_start_if_stopped' into develop
Diffstat (limited to 'src/leap/config/leapsettings.py')
-rw-r--r--src/leap/config/leapsettings.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/leap/config/leapsettings.py b/src/leap/config/leapsettings.py
index 88b7d8c9..35010280 100644
--- a/src/leap/config/leapsettings.py
+++ b/src/leap/config/leapsettings.py
@@ -227,10 +227,12 @@ class LeapSettings(object):
Sets the default provider to be used for autostarting EIP
:param provider: provider to use
- :type provider: str
+ :type provider: str or None
"""
- leap_assert(len(provider) > 0, "We cannot save an empty provider")
- self._settings.setValue(self.DEFAULTPROVIDER_KEY, provider)
+ if provider is None:
+ self._settings.remove(self.DEFAULTPROVIDER_KEY)
+ else:
+ self._settings.setValue(self.DEFAULTPROVIDER_KEY, provider)
def get_alert_missing_scripts(self):
"""