def upload_files(upload_data, files): uploaded_all = True for f in files: uploaded = upload_file(upload_data, f) if not uploaded: uploaded_all = False bg_blender.progress('finished uploading') return uploaded_all