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

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



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


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