[Yum-devel] [PATCH] Dump False and 0 as their values, and not the empty string

Seth Vidal skvidal at fedoraproject.org
Fri May 21 15:45:57 UTC 2010



On Fri, 21 May 2010, James Antill wrote:

> ---
> yum/config.py |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/yum/config.py b/yum/config.py
> index 3610b91..949751a 100644
> --- a/yum/config.py
> +++ b/yum/config.py
> @@ -752,7 +752,7 @@ class YumConf(StartupConf):
>             if isinstance(getattr(self, attr), types.MethodType):
>                 continue
>             res = getattr(self, attr)
> -            if not res:
> +            if not res and type(res) not in (type(False), type(0)):
>                 res = ''
>             if type(res) == types.ListType:
>                 res = ',\n   '.join(res)

ACK
-sv



More information about the Yum-devel mailing list