test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 0/1] framework/rst: fix syntax issue
@ 2019-10-18  8:06 yufengmx
  2019-10-18  8:06 ` [dts] [PATCH V1 1/1] framework/rst: fix syntax error yufengmx
  0 siblings, 1 reply; 2+ messages in thread
From: yufengmx @ 2019-10-18  8:06 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: yufengmx

 It should check rst folder existence before run os.mkdir. When rst folder exists, old source code will raise exception. 

yufengmx (1):
  framework/rst: fix syntax error

 framework/rst.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dts] [PATCH V1 1/1] framework/rst: fix syntax error
  2019-10-18  8:06 [dts] [PATCH V1 0/1] framework/rst: fix syntax issue yufengmx
@ 2019-10-18  8:06 ` yufengmx
  0 siblings, 0 replies; 2+ messages in thread
From: yufengmx @ 2019-10-18  8:06 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: yufengmx


It should check rst folder existence before run os.mkdir. When rst folder exists, old source code will raise exception.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 framework/rst.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/framework/rst.py b/framework/rst.py
index 2f36ab1..9179a09 100644
--- a/framework/rst.py
+++ b/framework/rst.py
@@ -68,7 +68,10 @@ class RstReport(object):
             for node in range(0, len(path)):
                 if not os.path.exists('/'.join(path[:node + 1])):
                     for level in range(node, len(path)):
-                        os.mkdir('/'.join(path[:level + 1]))
+                        rst_folder = '/'.join(path[:level + 1])
+                        if os.path.exists(rst_folder):
+                            continue
+                        os.mkdir(rst_folder)
                     break
 
             self.rstName = "%s/TestResult_%s.rst" % ('/'.join(path), suite)
-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-18  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18  8:06 [dts] [PATCH V1 0/1] framework/rst: fix syntax issue yufengmx
2019-10-18  8:06 ` [dts] [PATCH V1 1/1] framework/rst: fix syntax error yufengmx

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).