summaryrefslogtreecommitdiff
path: root/tests/helpers/soledad_sync.py
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-02-26 01:45:07 -0800
committerelijah <elijah@riseup.net>2016-02-26 01:45:07 -0800
commit15ca782e3bcd22f131c2b8745d7fad118b4b8648 (patch)
treeab04c576d6024e2fce1490d00c86c4ba0ecced8e /tests/helpers/soledad_sync.py
parent89a3cd71f50a383a5f85510193087446da0e661f (diff)
parent0206d426bd51aa4805915f6e23b53d5fdb40d738 (diff)
Merge branch 'develop' of ssh://leap.se/leap_platform into develop
Diffstat (limited to 'tests/helpers/soledad_sync.py')
-rwxr-xr-xtests/helpers/soledad_sync.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/helpers/soledad_sync.py b/tests/helpers/soledad_sync.py
index b8e8fbc9..f4fc81ae 100755
--- a/tests/helpers/soledad_sync.py
+++ b/tests/helpers/soledad_sync.py
@@ -17,6 +17,7 @@ It takes 5 arguments:
__author__: kali@leap.se
"""
import os
+import shutil
import sys
import tempfile
@@ -56,8 +57,13 @@ def create_docs(soledad):
if __name__ == '__main__':
tempdir = tempfile.mkdtemp()
+
+ def rm_tempdir():
+ shutil.rmtree(tempdir)
+
if len(sys.argv) < 6:
bail(USAGE, 2)
+
uuid, token, server, cert_file, passphrase = sys.argv[1:]
s = get_soledad_instance(
uuid, passphrase, tempdir, server, cert_file, token)
@@ -65,10 +71,12 @@ if __name__ == '__main__':
def onSyncDone(sync_result):
print "SYNC_RESULT:", sync_result
s.close()
+ rm_tempdir()
reactor.stop()
def log_and_exit(f):
log.err(f)
+ rm_tempdir()
reactor.stop()
def start_sync():