From 163766c9a416a15d2f591cda36bbd7126324f16a Mon Sep 17 00:00:00 2001 From: Leonardo Rodriguez Date: Fri, 27 Feb 2015 14:38:40 -0300 Subject: [PATCH] Trying to fix corrupted note_cache file after sublime text update --- quick_simplenote.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quick_simplenote.py b/quick_simplenote.py index ff2f1ec..7a87267 100644 --- a/quick_simplenote.py +++ b/quick_simplenote.py @@ -192,8 +192,8 @@ def load_notes(): return notes def save_notes(notes): - cache_file = open(path.join(package_path, 'note_cache'),'w+b') - pickle.dump(notes, cache_file) + with open(path.join(package_path, 'note_cache'),'w+b') as cache_file: + pickle.dump(notes, cache_file) class OperationManager: _instance = None