From bf643b1fa8c40ef0984eec8b40aaccf83ddd85a7 Mon Sep 17 00:00:00 2001 From: neingeist Date: Mon, 28 Sep 2015 08:51:22 +0200 Subject: [PATCH] maildir-zero: use dict.get() instead of dict.setdefault() --- maildir-zero | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maildir-zero b/maildir-zero index 9fdeeef..5366c35 100755 --- a/maildir-zero +++ b/maildir-zero @@ -41,9 +41,9 @@ try: config = yaml.load(open(os.path.expanduser(config_filename))) except: pass -ignore_zero = config.setdefault('ignore_zero', True) -ignore = config.setdefault('ignore', [r'spam']) -sort_by_count = config.setdefault('sort_by_count', True) +ignore_zero = config.get('ignore_zero', True) +ignore = config.get('ignore', [r'spam']) +sort_by_count = config.get('sort_by_count', True) root = os.path.expanduser('~/Maildir')