Fix NameError: folders_str is not defined
This commit is contained in:
@@ -135,13 +135,10 @@ def main():
|
|||||||
client_secret = config.get('CLIENT_SECRET')
|
client_secret = config.get('CLIENT_SECRET')
|
||||||
site_url = config.get('SITE_URL')
|
site_url = config.get('SITE_URL')
|
||||||
drive_name = config.get('DOCUMENT_LIBRARY')
|
drive_name = config.get('DOCUMENT_LIBRARY')
|
||||||
folders_to_download_str = config.get('FOLDERS_TO_DOWNLOAD')
|
folders_to_download_str = config.get('FOLDERS_TO_DOWNLOAD', '')
|
||||||
local_path_base = config.get('LOCAL_PATH').replace('\\', os.sep)
|
local_path_base = config.get('LOCAL_PATH', '').replace('\\', os.sep)
|
||||||
|
|
||||||
folders_to_download = [f.strip() for f in folders_str.split(',')] if 'FOLDERS_TO_DOWNLOAD' in config else []
|
folders_to_download = [f.strip() for f in folders_to_download_str.split(',') if f.strip()]
|
||||||
# Safeguard if FOLDERS_TO_DOWNLOAD is missing
|
|
||||||
if not folders_to_download:
|
|
||||||
folders_to_download = [f.strip() for f in folders_to_download_str.split(',')]
|
|
||||||
|
|
||||||
print(f"Connecting via Graph API (with auto-refresh and skip logic)...")
|
print(f"Connecting via Graph API (with auto-refresh and skip logic)...")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user