From cb01d7324328d6bdb733eff23f389909f5848e1e Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Fri, 10 Mar 2023 12:36:55 -0800 Subject: [PATCH] Use CreateFileWithMode for cache. --- examples/reminder/reminder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/reminder/reminder.py b/examples/reminder/reminder.py index 5fbd476..f2ea267 100755 --- a/examples/reminder/reminder.py +++ b/examples/reminder/reminder.py @@ -259,7 +259,9 @@ class Reminder(object): def save(self): import pickle - with open(config.config["reminder_cache_file"], "wb") as wf: + with file_utils.CreateFileWithMode( + config.config["reminder_cache_file"], filesystem_mode=0o600, open_mode="wb" + ) as wf: pickle.dump( self.label_by_date, wf, -- 2.47.1