[telepathy-gabble/master] style tweaks for gabbletest.py

Dafydd Harries dafydd.harries at collabora.co.uk
Thu Aug 6 06:56:44 PDT 2009


---
 tests/twisted/gabbletest.py |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/twisted/gabbletest.py b/tests/twisted/gabbletest.py
index 4936ee8..094e58e 100644
--- a/tests/twisted/gabbletest.py
+++ b/tests/twisted/gabbletest.py
@@ -368,7 +368,7 @@ def disconnect_conn(q, conn, stream, expected=[]):
     events = q.expect_many(*tmp)
     return events[:-1]
 
-def exec_test_deferred (funs, params, protocol=None, timeout=None,
+def exec_test_deferred(funs, params, protocol=None, timeout=None,
                         authenticator=None):
     # hack to ease debugging
     domish.Element.__repr__ = domish.Element.toXml
@@ -400,8 +400,10 @@ def exec_test_deferred (funs, params, protocol=None, timeout=None,
         error = e
 
     if colourer:
-      sys.stdout = colourer.fh
+        sys.stdout = colourer.fh
+
     d = port.stopListening()
+
     if error is None:
         d.addBoth((lambda *args: reactor.crash()))
     else:
@@ -416,9 +418,9 @@ def exec_test_deferred (funs, params, protocol=None, timeout=None,
 
 def exec_tests(funs, params=None, protocol=None, timeout=None,
                authenticator=None):
-  reactor.callWhenRunning (exec_test_deferred, funs, params, protocol, timeout,
-    authenticator)
-  reactor.run()
+    reactor.callWhenRunning(
+        exec_test_deferred, funs, params, protocol, timeout, authenticator)
+    reactor.run()
 
 def exec_test(fun, params=None, protocol=None, timeout=None,
               authenticator=None):
-- 
1.5.6.5




More information about the telepathy-commits mailing list