[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH] cliconfig: fix another configuration file parsing problem



On 10/09/2013 11:36 AM, Giuseppe Scrivano wrote:
> Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>
> ---
>  virtcli/cliconfig.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/virtcli/cliconfig.py b/virtcli/cliconfig.py
> index c4d2fc5..3011543 100644
> --- a/virtcli/cliconfig.py
> +++ b/virtcli/cliconfig.py
> @@ -43,7 +43,7 @@ def _get_param(name, default):
>          return default
>      try:
>          return cfg.get("config", name)
> -    except ConfigParser.NoOptionError:
> +    except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
>          return default
>  
>  
> 

ACK

- Cole


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]