From 1c061783b42aecf8d8843adf9bd89baaba58996c Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 6 Jan 2019 18:27:29 -0800 Subject: accounts: write newline at end of file when saving accounts --- youtube/accounts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube') diff --git a/youtube/accounts.py b/youtube/accounts.py index 458703a..4108269 100644 --- a/youtube/accounts.py +++ b/youtube/accounts.py @@ -23,7 +23,7 @@ def account_list_data(): def save_accounts(): to_save = {channel_id: account for channel_id, account in accounts.items() if account['save']} with open(os.path.join(settings.data_dir, 'accounts.txt'), 'w', encoding='utf-8') as f: - f.write(json.dumps(to_save, indent=4)) + f.write(json.dumps(to_save, indent=4)+'\n') def cookiejar_from_lwp_str(lwp_str): lwp_str = "#LWP-Cookies-2.0\n" + lwp_str # header required by _really_load for reading from "file" -- cgit v1.2.3