Commit 70db2a90 authored by Franziska Koehn's avatar Franziska Koehn
Browse files

force to get host parameter

parent b8beda34
......@@ -21,19 +21,17 @@ get_credentials.cache = None
def download_all(results, host=None):
def download_all(results, host):
for r in results:
download(r, host)
def download_async(result, dest_folder='', host=None, cb=(lambda *_: None), cb_args=()):
def download_async(result, host, dest_folder='', cb=(lambda *_: None), cb_args=()):
from threading import Thread
download_thread = Thread(target=download, args=(result, dest_folder, host, cb, cb_args))
download_thread = Thread(target=download, args=(result, host, dest_folder, cb, cb_args))
download_thread.start()
return download_thread
def download(result, dest_folder='', host=None, cb=(lambda *_: None), cb_args=()):
if not host:
host = HOST
def download(result, host, dest_folder='', cb=(lambda *_: None), cb_args=()):
requests_lock.acquire()
print(result)
subject = result['xnat_mrsessiondata_subject_id'] #TODO download andere typen
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment