[test-API][PATCH 3/3] update parser to add "clean" keyword

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

 



---
 parser.py |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/parser.py b/parser.py
index 085a1f2..883de89 100644
--- a/parser.py
+++ b/parser.py
@@ -391,12 +391,21 @@ class CaseFileParser(object):
 
                 if len(tripped_caselist) == 2 and \
                         tripped_casename == "sleep":
-                   sleepsecs = tripped_caselist[1]
-                   for caselist in list:
-                       newdict = {}
-                       newdict[tripped_casename] = {'sleep':sleepsecs}
-                       caselist.append(newdict)
-                   continue
+                    sleepsecs = tripped_caselist[1]
+                    for caselist in list:
+                        newdict = {}
+                        newdict[tripped_casename] = {'sleep':sleepsecs}
+                        caselist.append(newdict)
+                    continue
+
+                if len(tripped_caselist) == 1 and \
+                        tripped_casename == "clean":
+                    cleanflag = 'yes'
+                    for caselist in list:
+                        newdict = {}
+                        newdict[tripped_casename] = {'clean': cleanflag}
+                        caselist.append(newdict)
+                    continue
 
                 if tripped_casename == "options":
                     option_case = [{'options':{}}]
-- 
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]