diff options
Diffstat (limited to 'cli/app/utils/cortex_utils.py')
| -rw-r--r-- | cli/app/utils/cortex_utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/app/utils/cortex_utils.py b/cli/app/utils/cortex_utils.py index bf49f96..0de9596 100644 --- a/cli/app/utils/cortex_utils.py +++ b/cli/app/utils/cortex_utils.py @@ -13,6 +13,12 @@ def api_url(path): def cortex_folder(opt_folder_id): return fetch_json(os.path.join(api_url('folder'), str(opt_folder_id) + "/")) +def results_folder(name="results", module="biggan"): + res = fetch_json(api_url('folder'), name=name, module=module) + if len(res): + return res[0] + raise Exception("No results folder!") + def download_cortex_files(opt_folder_id): """Fetch all new, non-generated files in a Cortex folder""" rows = fetch_json(api_url('file'), folder_id=opt_folder_id) |
