[Telepathy-commits] [telepathy-gabble/master] Update coding style and use addBoth instead of addCallbacks, as per dafs review

Sjoerd Simons sjoerd.simons at collabora.co.uk
Tue Aug 19 10:54:15 PDT 2008


20080730122438-b58c9-f7777124d8feb005c49645348871c8511b6ace29.gz
---
 tests/twisted/gabbletest.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/tests/twisted/gabbletest.py b/tests/twisted/gabbletest.py
index fc7b156..ab25e07 100644
--- a/tests/twisted/gabbletest.py
+++ b/tests/twisted/gabbletest.py
@@ -318,14 +318,11 @@ def exec_test_deferred (fun, params, protocol=None, timeout=None):
         except dbus.DBusException, e:
             pass
 
-    if colourer != None:
+    if colourer:
       sys.stdout = colourer.fh
 
     d = port.stopListening()
-
-    d.addCallbacks ((lambda *args: reactor.crash()),
-                    (lambda *args: reactor.crash()))
-
+    d.addBoth((lambda *args: reactor.crash()))
 
 def exec_test(fun, params=None, protocol=None, timeout=None):
   reactor.callWhenRunning (exec_test_deferred, fun, params, protocol, timeout)
-- 
1.5.6.3




More information about the Telepathy-commits mailing list