aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2005-07-28 18:54:15 +0000
committerBrian Harring <ferringb@gentoo.org>2005-07-28 18:54:15 +0000
commite45e21b6eda7a351723c9f21ee13eca736d7977e (patch)
tree2655e39f20201d83d632f35aacdbe76fc56b09a9
parentbug fixes, and updates. (diff)
downloadportage-cvs-e45e21b6eda7a351723c9f21ee13eca736d7977e.tar.gz
portage-cvs-e45e21b6eda7a351723c9f21ee13eca736d7977e.tar.bz2
portage-cvs-e45e21b6eda7a351723c9f21ee13eca736d7977e.zip
bug in bool_parser's var interpretation ("no" != True, "no" == False)
-rw-r--r--portage/config/central.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/portage/config/central.py b/portage/config/central.py
index 5db836c..f28f408 100644
--- a/portage/config/central.py
+++ b/portage/config/central.py
@@ -1,7 +1,7 @@
# Copyright: 2005 Gentoo Foundation
# Author(s): Brian Harring (ferringb@gentoo.org)
# License: GPL2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/portage/config/central.py,v 1.6 2005/07/21 19:50:17 ferringb Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/portage/config/central.py,v 1.7 2005/07/28 18:54:15 ferringb Exp $
import errors, new
from portage.const import CONF_DEFAULTS
@@ -281,4 +281,7 @@ def str_parser(s):
return ''
def bool_parser(s):
- return bool(str_parser(s))
+ s = str_parser(s).lower()
+ if s in ("", "no", "false", "0"):
+ return False
+ return True