diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-06-12 09:46:57 (GMT) |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-06-12 09:46:57 (GMT) |
commit | c527ed1f9453d09c99e91667cf110672f1bc583c (patch) | |
tree | 4405e07b215b3f091833a3b58cf70e29ca4310e1 | |
parent | caaface482ee5a7f1acbf8066bca228557129ea3 (diff) |
presenceservice: Allow "export PRESENCE_SERVICE_DEBUG=disable-gabble,disable-salut" so I can test Salut only, without disconnecting from the Internet
-rw-r--r-- | src/presenceservice.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/presenceservice.py b/src/presenceservice.py index d640ffd..22825b0 100644 --- a/src/presenceservice.py +++ b/src/presenceservice.py @@ -17,6 +17,7 @@ import logging from itertools import izip +from os import environ from weakref import WeakValueDictionary import dbus @@ -103,7 +104,12 @@ class PresenceService(ExportedGObject): # Set up the Telepathy plugins self._server_plugin = ServerPlugin(self._registry, self._owner) self._ll_plugin = LinkLocalPlugin(self._registry, self._owner) - self._plugins = [self._server_plugin, self._ll_plugin] + self._plugins = [] + debug_flags = set(environ.get('PRESENCE_SERVICE_DEBUG', '').split(',')) + if 'disable-gabble' not in debug_flags: + self._plugins.append(self._server_plugin) + if 'disable-salut' not in debug_flags: + self._plugins.append(self._ll_plugin) self._connected_plugins = set() for tp in self._plugins: |