From de1db96fc3ee52f43d38c1f042e7ffb545b187ca Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 21 Apr 2006 22:27:52 +0000 Subject: [PATCH] The key may be absent in the DB. git-svn-id: file:///home/phd/archive/SVN/xsetbg/trunk@13 143022c7-580b-0410-bae3-87f2bf5d3141 --- xsetbg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xsetbg.py b/xsetbg.py index bca8f45..e3f3365 100755 --- a/xsetbg.py +++ b/xsetbg.py @@ -139,7 +139,10 @@ for key in global_db.keys(): to_delete.append(key) for key in to_delete: - del global_db[key] + try: + del global_db[key] + except KeyError: + pass global_db.close() # Close DB in the parent process -- 2.39.5