diff options
author | Simo Sorce <simo@redhat.com> | 2014-11-03 17:28:58 -0500 |
---|---|---|
committer | Patrick Uiterwijk <puiterwijk@redhat.com> | 2014-11-12 23:47:39 +0100 |
commit | b07ee59ded4f926a38cd1b30d7f8de7b568840a8 (patch) | |
tree | 521c70a5c8f12a72bcb487f2f71a4659ff3161eb /ipsilon/util | |
parent | b15a773ee9257f0102f24b6f634cf55a5948a443 (diff) | |
download | ipsilon-b07ee59ded4f926a38cd1b30d7f8de7b568840a8.tar.gz ipsilon-b07ee59ded4f926a38cd1b30d7f8de7b568840a8.tar.xz ipsilon-b07ee59ded4f926a38cd1b30d7f8de7b568840a8.zip |
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 <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'ipsilon/util')
-rwxr-xr-x | ipsilon/util/plugin.py | 8 |
1 files changed, 8 insertions, 0 deletions
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 |