]> git.phdru.name Git - xsetbg.git/commitdiff
The key may be absent in the DB.
authorOleg Broytman <phd@phdru.name>
Fri, 21 Apr 2006 22:27:52 +0000 (22:27 +0000)
committerOleg Broytman <phd@phdru.name>
Fri, 21 Apr 2006 22:27:52 +0000 (22:27 +0000)
git-svn-id: file:///home/phd/archive/SVN/xsetbg/trunk@13 143022c7-580b-0410-bae3-87f2bf5d3141

xsetbg.py

index bca8f45f1144672de38c5ab4fd5bc0977d32dd04..e3f3365532d6b65f4f484f46c657aa557148df08 100755 (executable)
--- 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