Use dict.pop(k, None) to delete items if they exist.
authorZac Medico <zmedico@gentoo.org>
Fri, 29 Sep 2006 01:14:31 +0000 (01:14 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 29 Sep 2006 01:14:31 +0000 (01:14 -0000)
svn path=/main/trunk/; revision=4551

bin/emerge

index af6d552f06bbdff32b64c45a2b97547ad43e37b7..6e2b3c88387ab091217d93bd1af4c3d7f7db1609 100755 (executable)
@@ -3470,8 +3470,7 @@ def action_build(settings, trees, mtimedb,
                myresumeopts = dict([(k,True) for k in mtimedb["resume"]["myopts"]])
 
                for opt in ("--skipfirst", "--ask", "--tree"):
-                       if opt in myresumeopts:
-                               del myresumeopts[opt]
+                       myresumeopts.pop(opt, None)
 
                for myopt, myarg in myopts.iteritems():
                        if myopt not in myresumeopts: