diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-01-06 18:27:29 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-01-06 18:27:29 -0800 |
commit | 1c061783b42aecf8d8843adf9bd89baaba58996c (patch) | |
tree | 7f28ec8e4face1fefee61008369c76af5eb0a625 /youtube/accounts.py | |
parent | 36e0409db4486c1043e46699d07278e4abbedcec (diff) | |
download | yt-local-1c061783b42aecf8d8843adf9bd89baaba58996c.tar.lz yt-local-1c061783b42aecf8d8843adf9bd89baaba58996c.tar.xz yt-local-1c061783b42aecf8d8843adf9bd89baaba58996c.zip |
accounts: write newline at end of file when saving accounts
Diffstat (limited to 'youtube/accounts.py')
-rw-r--r-- | youtube/accounts.py | 2 |
1 files changed, 1 insertions, 1 deletions
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" |