From c527ed1f9453d09c99e91667cf110672f1bc583c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 12 Jun 2007 09:46:57 +0000 Subject: presenceservice: Allow "export PRESENCE_SERVICE_DEBUG=disable-gabble,disable-salut" so I can test Salut only, without disconnecting from the Internet --- 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: -- cgit v0.9.1