summaryrefslogtreecommitdiff
path: root/src/leap/config/leapsettings.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-06-13 15:39:21 -0300
committerTomás Touceda <chiiph@leap.se>2013-06-13 15:39:21 -0300
commitc3fa54bc8628ba1618aba7b09a0daf458e798d3c (patch)
tree9f8d5149461f29879d442bba5b643d0b50194e76 /src/leap/config/leapsettings.py
parent93db3e9da1347f239eba937120c6f7fb05eaab0a (diff)
Don't autostart EIP if the user explicitly stops the service
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):
"""