[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.1.0-41-g9b780d8
X2Go dev team
git-admin at x2go.org
Tue Apr 23 23:21:55 CEST 2013
The branch, build-main has been updated
via 9b780d88aafa5432de58ca2c0606fe7a0048b1bc (commit)
from 18a92d3014e5060b7fc959518ad822f572e89691 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 1 +
x2gobroker/brokers/base_broker.py | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 79326c5..cabec30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,7 @@ x2gobroker (0.0.1.1-0~x2go1) UNRELEASED; urgency=low
daemon script.
- Add forgotten file: x2gobroker-authservice-logger.conf. (Fixes: #180).
- Add script: x2gobroker-testauth.
+ - Add enable()/disable() methods to broker backends.
* /debian/control:
+ Fix --root parameter in DEB_PYTHON_INSTALL_ARGS.
+ Let bin:package x2gobroker-authservice depend on python-x2gobroker (of the
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index b9038c3..2ce0ba4 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -65,6 +65,7 @@ class X2GoBroker(object):
if self.config_file is None: self.config_file = x2gobroker.defaults.X2GOBROKER_CONFIG
if config_defaults is None: config_defaults = x2gobroker.defaults.X2GOBROKER_CONFIG_DEFAULTS
self.config = x2gobroker.config.X2GoBrokerConfigFile(config_files=self.config_file, defaults=config_defaults)
+ self.enabled = self.config.get_value(self.backend_name, 'enable')
self._dynamic_cookie_map = {}
self._client_address = None
@@ -81,7 +82,21 @@ class X2GoBroker(object):
Check if this backend has been enabled in the configuration file.
"""
- return self.config.get_value(self.backend_name, 'enable')
+ return self.enabled
+
+ def enable(self):
+ """\
+ Enable this broker backend.
+
+ """
+ self.enabled = True
+
+ def disable(self):
+ """\
+ Disable this broker backend.
+
+ """
+ self.enabled = False
def set_client_address(self, address):
"""\
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
More information about the x2go-commits
mailing list