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

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



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
 
 
-- 
1.8.3.1


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