diff options
author | Kali Kaneko <kali@leap.se> | 2015-07-13 11:48:47 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-07-21 13:26:57 -0400 |
commit | 467b14fa2e29ecd6f41d4834b00593d8c86cddc5 (patch) | |
tree | 90a55edfd571974bdb68ec4e65b5c068aa03dbcf /src/leap/common/events/__init__.py | |
parent | 87339921eac261954e39901e3563851830309cc5 (diff) |
[feature] add global flag for disabling the events framework
this will be used to allow the unittests to disable the events
framework. this way, emit() will become a passthrough.
note that, until now, the basetest class is making use of the threaded
version of the client, which launches a zmq tornado-based ioloop. this
is wrong, and will have to be addressed in a future commit. we'll have
to make use of the global EVENTS_ENABLED flag in the txclient version
when those changes are made.
Related: #7259
Relases: 0.4.2
Diffstat (limited to 'src/leap/common/events/__init__.py')
-rw-r--r-- | src/leap/common/events/__init__.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/leap/common/events/__init__.py b/src/leap/common/events/__init__.py index 9269b9a..87ed8ae 100644 --- a/src/leap/common/events/__init__.py +++ b/src/leap/common/events/__init__.py @@ -14,8 +14,6 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. - - """ This is an events mechanism that uses a server to allow for emitting events between clients. @@ -37,13 +35,13 @@ To emit an event, use leap.common.events.emit(): >>> from leap.common.events import catalog >>> emit(catalog.CLIENT_UID) """ - - import logging import argparse from leap.common.events import client from leap.common.events import server +from leap.common.events.flags import set_events_enabled + from leap.common.events import catalog @@ -52,6 +50,7 @@ __all__ = [ "unregister", "emit", "catalog", + "set_events_enabled" ] |