[test-API][PATCH 2/2] Replace env.conf with global.conf in env_parser

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

 



  Only update the expection info when parsing.

Signed-off-by: Wayne Sun <gsun@xxxxxxxxxx>
---
 src/env_parser.py |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/env_parser.py b/src/env_parser.py
index f02af57..ddda727 100644
--- a/src/env_parser.py
+++ b/src/env_parser.py
@@ -30,7 +30,7 @@ class Envparser(object):
             self.cfg.read(configfile)
         else:
             raise exception.FileDoesNotExist(
-            "env.conf is not a regular file or nonexist")
+            "global.conf is not a regular file or nonexist")
 
     def has_section(self, section):
         if self.cfg.has_section(section):
@@ -46,7 +46,7 @@ class Envparser(object):
                 return False
         else:
             raise exception.SectionDoesNotExist(
-            "In env.conf, the section %s is nonexist" % section)
+            "In global.conf, the section %s is nonexist" % section)
 
     def sections_list(self):
         return self.cfg.sections()
@@ -56,7 +56,7 @@ class Envparser(object):
             return self.cfg.options(section)
         else:
             raise exception.SectionDoesNotExist(
-            "In env.conf, the section %s is nonexist" % section)
+            "In global.conf, the section %s is nonexist" % section)
 
     def get_value(self, section, option):
         if self.has_section:
@@ -64,17 +64,17 @@ class Envparser(object):
                 return self.cfg.get(section, option)
             else:
                 raise exception.OptionDoesNotExist(
-                "In env.conf, the option %s is nonexist" % option)
+                "In global.conf, the option %s is nonexist" % option)
         else:
             raise exception.SectionDoesNotExist(
-            "In env.conf, the section %s is nonexist" % section)
+            "In global.conf, the section %s is nonexist" % section)
 
     def get_items(self, section):
         if self.has_section:
             return self.cfg.items(section)
         else:
             raise exception.SectionDoesNotExist(
-            "In env.conf, the section %s is nonexist" % section)
+            "In global.conf, the section %s is nonexist" % section)
 
     def add_section(self, section):
         if self.has_section:
@@ -91,10 +91,10 @@ class Envparser(object):
                 return True
             else:
                 raise exception.OptionDoesNotExist(
-                "In env.conf, the option %s is nonexist" % option)
+                "In global.conf, the option %s is nonexist" % option)
         else:
             raise exception.SectionDoesNotExist(
-            "In env.conf, the section %s is nonexist" % section)
+            "In global.conf, the section %s is nonexist" % section)
 
     def remove_section(self, section):
         if self.has_section:
@@ -102,7 +102,7 @@ class Envparser(object):
             return True
         else:
             raise exception.SectionDoesNotExist(
-            "In env.conf, the section %s is nonexist" % section)
+            "In global.conf, the section %s is nonexist" % section)
 
     def set_value(self, section, option, value):
         if self.has_section:
@@ -111,6 +111,6 @@ class Envparser(object):
                 return True
             else:
                 raise exception.OptionDoesNotExist(
-                "In env.conf, the option %s is nonexist" % option)
+                "In global.conf, the option %s is nonexist" % option)
         raise exception.SectionDoesNotExist(
-        "In env.conf, the section %s is nonexist" % section)
+        "In global.conf, the section %s is nonexist" % section)
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]