From 27c471e5e659f9e0e42b45e7c0cafa36511e6ce6 Mon Sep 17 00:00:00 2001 From: Jakob Date: Sun, 1 Dec 2019 21:57:34 -0600 Subject: [PATCH] Create course root directory as needed --- main.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 5ea39fb..e2d78db 100644 --- a/main.py +++ b/main.py @@ -85,6 +85,7 @@ with StorageManager(Path('auth_cache')) as storage_mgr: [content_id] = content_ids local_course_root = fs.WinPath(cfg_section['base_path']) + local_course_root.mkdir(parents = True, exist_ok = True) meta_path = local_course_root.get_ads(fs.BB_META_STREAM_NAME) if meta_path.is_file(): with meta_path.open() as f: @@ -167,11 +168,7 @@ with StorageManager(Path('auth_cache')) as storage_mgr: # versions match pass elif isinstance(result, Result.MultipleLatest): - log( - 'error', - "Identified multiple latest versions for {id}: {fileName}".format(**attachment_doc), - indent = 2, - ) + log('error', "Identified multiple latest versions!", indent = 2) log( 'error', "To allow the program to check this attachment, delete all or all but one of these files:", -- 2.30.2