From: Jakob Date: Mon, 2 Dec 2019 03:57:34 +0000 (-0600) Subject: Create course root directory as needed X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=27c471e5e659f9e0e42b45e7c0cafa36511e6ce6;p=bb-sync-api.git Create course root directory as needed --- 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:",