From b07ee59ded4f926a38cd1b30d7f8de7b568840a8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 3 Nov 2014 17:28:58 -0500 Subject: Return proper errors if config is read-only Do not throw 501 errors, instead return warnings that the configuration changes cannot be applied. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/util/plugin.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ipsilon/util/plugin.py') diff --git a/ipsilon/util/plugin.py b/ipsilon/util/plugin.py index 063767c..ae98b4c 100755 --- a/ipsilon/util/plugin.py +++ b/ipsilon/util/plugin.py @@ -89,6 +89,10 @@ class PluginLoader(Log): self.__data = AdminStore() return self.__data + @property + def is_readonly(self): + return self._data.is_readonly + def get_plugins(self): p = Plugins() return p.get_plugins(self._pathname, self._plugin_type, self) @@ -129,6 +133,10 @@ class PluginObject(Log): self._plugins = plugins self.is_enabled = False + @property + def is_readonly(self): + return self._data.is_readonly + def on_enable(self): return -- cgit