summaryrefslogtreecommitdiff
path: root/src/leap/config
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-06-13 01:19:49 +0900
committerkali <kali@leap.se>2013-06-13 22:31:24 +0900
commitba27c14ba84c6869c187bdd09138bfae4424445d (patch)
tree9f73c8eb401813cea0b19752ef8d1eeafe02edc5 /src/leap/config
parent9b2c0d673a1a8a4641508188c87662c9eacfd0ce (diff)
copy missing updown scripts if missing
Diffstat (limited to 'src/leap/config')
-rw-r--r--src/leap/config/leapsettings.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/leap/config/leapsettings.py b/src/leap/config/leapsettings.py
index 006be851..ab0c1860 100644
--- a/src/leap/config/leapsettings.py
+++ b/src/leap/config/leapsettings.py
@@ -66,6 +66,7 @@ class LeapSettings(object):
PROPERPROVIDER_KEY = "ProperProvider"
REMEMBER_KEY = "RememberUserAndPass"
DEFAULTPROVIDER_KEY = "DefaultProvider"
+ ALERTMISSING_KEY = "AlertMissingScripts"
def __init__(self, standalone=False):
"""
@@ -249,3 +250,21 @@ class LeapSettings(object):
"""
leap_assert(len(provider) > 0, "We cannot save an empty provider")
self._settings.setValue(self.DEFAULTPROVIDER_KEY, provider)
+
+ def get_alert_missing_scripts(self):
+ """
+ Returns the setting for alerting of missing up/down scripts.
+
+ :rtype: bool
+ """
+ return to_bool(self._settings.value(self.ALERTMISSING_KEY, True))
+
+ def set_alert_missing_scripts(self, value):
+ """
+ Sets the setting for alerting of missing up/down scripts.
+
+ :param value: the value to set
+ :type value: bool
+ """
+ leap_assert_type(value, bool)
+ self._settings.setValue(self.ALERTMISSING_KEY, value)