[X2Go-Commits] [x2gobroker] 15/17: broker-use-load-checker profile option: Also tolerate 'TRUE' and 'True'.

git-admin at x2go.org git-admin at x2go.org
Fri Dec 14 09:56:13 CET 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2gobroker.

commit 95700473c181f0e6905d5aa4d7cc3f5172c3cc20
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Nov 30 10:39:02 2018 +0100

    broker-use-load-checker profile option: Also tolerate 'TRUE' and 'True'.
---
 debian/changelog                  | 1 +
 x2gobroker/brokers/base_broker.py | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index eb7983d..6138397 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -91,6 +91,7 @@ x2gobroker (0.0.4.0-0x2go1) UNRELEASED; urgency=medium
     - Convert one more unicode object into (Python3) string.
     - x2gobroker/tests/test_broker_agent.py: Assure that tests are run without
       loadchecker usage.
+    - broker-use-load-checker profile option: Also tolerate 'TRUE' and 'True'.
   * debian/*:
     + Trigger Makefile's install target and install those files. Drop debhelper
       from-source-installation magic.
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index b6c9b3f..d8e1847 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -746,12 +746,12 @@ class X2GoBroker(object):
             return False
 
         # if not blocked on a per session profile basis
-        if 'broker-use-load-checker' in _profile_broker and _profile_broker['broker-use-load-checker'] not in ('1', 'true'):
+        if 'broker-use-load-checker' in _profile_broker and _profile_broker['broker-use-load-checker'] not in ('1', 'true', 'TRUE', 'True'):
             return False
 
         # if load checking is enabled globally, for the broker backend,
         # or for the given session profile...
-        if self.get_use_load_checker() or ('broker-use-load-checker' in _profile_broker and _profile_broker['broker-use-load-checker'] in ('1', 'true')):
+        if self.get_use_load_checker() or ('broker-use-load-checker' in _profile_broker and _profile_broker['broker-use-load-checker'] in ('1', 'true', 'TRUE', 'True')):
             return True
 
         return False

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git


More information about the x2go-commits mailing list