X-Git-Url: http://git.maemo.org/git/?p=theonering;a=blobdiff_plain;f=src%2Ftelepathy-theonering;h=33decda1d9bf359ce3fe1e0f29ec464dcdae4b53;hp=a32d3dbdd967f61c2b8305eeb1828b3ee933d16a;hb=00b3702cd38fb5654609f9a822c660928b977ef7;hpb=b7bc7b79578a89acc766c6efc32c21be9ff151c0 diff --git a/src/telepathy-theonering b/src/telepathy-theonering index a32d3db..33decda 100755 --- a/src/telepathy-theonering +++ b/src/telepathy-theonering @@ -45,13 +45,13 @@ def run_theonering(): manager.quit() mainloop.quit() + def timeout_cb(): + if len(manager._connections) == 0: + logging.info('No connection received - quitting') + quit() + return False - if 'BUTTERFLY_PERSIST' not in os.environ: - def timeout_cb(): - if len(manager._connections) == 0: - logging.info('No connection received - quitting') - quit() - return False + if 'THEONERING_PERSIST' not in os.environ: gobject.timeout_add(IDLE_TIMEOUT, timeout_cb) shutdown_callback = quit else: @@ -75,6 +75,6 @@ def run_theonering(): if __name__ == '__main__': - telepathy_utils.debug_divert_messages(os.getenv('BUTTERFLY_LOGFILE')) + telepathy_utils.debug_divert_messages(os.getenv('THEONERING_LOGFILE')) logging.basicConfig(level=logging.DEBUG) run_theonering()