summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-01-25 12:01:39 -0400
committerRuben Pollan <meskio@sindominio.net>2016-01-26 10:16:52 +0100
commitc010d7dd1307e5cdb344b25fea078af8108df20a (patch)
treeb32cbc779c19337e972dc09fc646a9a1bfac36c1 /tests
parentc2b7f3c5ba8089bb3d4d07cba374f06020674927 (diff)
[bug] add errback to log failure
Diffstat (limited to 'tests')
-rwxr-xr-xtests/helpers/soledad_sync.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/helpers/soledad_sync.py b/tests/helpers/soledad_sync.py
index a1cea069..b8e8fbc9 100755
--- a/tests/helpers/soledad_sync.py
+++ b/tests/helpers/soledad_sync.py
@@ -25,6 +25,7 @@ import tempfile
os.environ['SKIP_TWISTED_SSL_CHECK'] = '1'
from twisted.internet import defer, reactor
+from twisted.python import log
from client_side_db import get_soledad_instance
from leap.common.events import flags
@@ -66,10 +67,15 @@ if __name__ == '__main__':
s.close()
reactor.stop()
+ def log_and_exit(f):
+ log.err(f)
+ reactor.stop()
+
def start_sync():
d = create_docs(s)
d.addCallback(lambda _: s.sync())
d.addCallback(onSyncDone)
+ d.addErrback(log_and_exit)
reactor.callWhenRunning(start_sync)
reactor.run()