[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.1.0-73-gf0ad386

X2Go dev team git-admin at x2go.org
Sat Apr 27 13:04:13 CEST 2013


The branch, build-main has been updated
       via  f0ad3869aa976cfef4472c0a1137d01ea956fce0 (commit)
      from  85ffd94dae231162d20c38c9c7a2c7dab99b6e0c (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 17b3755..e38e86b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,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 43e4d79..3cac792 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