From 767bfca97a931def28d354d18c1ec3541779ff59 Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Wed, 18 Jun 2014 09:46:31 +1000 Subject: [PATCH] [plugin API] Open preference file for reading as binary Otherwise, the file is not readable as such when reloading, and the plugin (e.g., Hamster integration) always uses the defaults. Signed-off-by: Olivier Mehani --- GTG/core/plugins/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GTG/core/plugins/api.py b/GTG/core/plugins/api.py index 6e881f4..09c3f4f 100644 --- a/GTG/core/plugins/api.py +++ b/GTG/core/plugins/api.py @@ -237,7 +237,7 @@ class PluginAPI: if os.path.isdir(dirname): if os.path.isfile(path): try: - with open(path, 'r') as file: + with open(path, 'rb') as file: item = pickle.load(file) config.update(item) except: -- 2.0.0