Use set.discard() instead of remove() to avoid a potential KeyError.
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Jul 2007 04:54:03 +0000 (04:54 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Jul 2007 04:54:03 +0000 (04:54 -0000)
svn path=/main/trunk/; revision=7230

pym/emerge/__init__.py

index f93e93adcd3b2863cb85945019d4eefdc06b7b95..b5c05c63e741b181f1f3838c313b052b76e700c3 100644 (file)
@@ -351,9 +351,9 @@ def create_depgraph_params(myopts, myaction):
                myparams.add("selective")
        if "--emptytree" in myopts:
                myparams.add("empty")
-               myparams.remove("selective")
+               myparams.discard("selective")
        if "--nodeps" in myopts:
-               myparams.remove("recurse")
+               myparams.discard("recurse")
        if "--deep" in myopts:
                myparams.add("deep")
        return myparams