From 52e30bc4ac4eff50ec24057ef518e9819dc9f182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 Apr 2009 00:43:16 +0200 Subject: [PATCH] Add signal_connected on signal event --- tryton/signal_event.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tryton/signal_event.py b/tryton/signal_event.py index 0e3e269a1a..e5bfa5c2fb 100644 --- a/tryton/signal_event.py +++ b/tryton/signal_event.py @@ -1,4 +1,5 @@ -#This file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. +#This file is part of Tryton. The COPYRIGHT file at the top level of +#this repository contains the full copyright notices and license terms. "Signal event" @@ -13,6 +14,9 @@ class SignalEvent(object): fnct(self, signal_data, *data) return True + def signal_connected(self, signal): + return bool(self.__connects.get(signal)) + def signal_connect(self, key, signal, fnct, *data): self.__connects.setdefault(signal, []) if (fnct, data, key) not in self.__connects[signal]: