These two days have been plagued by a problem.
In Jenkins, Windows Batch command tested well, got the bat file, and then called the bat from Execute Windows Batch command, unexpectedly error.
Why is it?
Let's introduce the logic of the scene and the code. Test the Good code:
CD%rootpath%
. \tools\bin\python26\python.
" Test "
In fact, Autobuild_path is a path, with "\" as the delimiter, exactly, in Python, is a raw path string. SendMail will go to this path under walk, or Listdir, find the file and read the post-processing email to [email protected]
Error message:
On the Internet, see the explanation for this much-out * * *:
Http://bbs.chinaunix.net/thread-3577853-1-1.html This article introduced a good, read the next probably understand the problem.
However, how to solve my problem, and my question is the key, and how to produce it?
I tried if os.listdir if the incoming parameter is the "\" of the raw string, it succeeds, and I find this, trying to convert the path to a raw string. Results the test cannot pass.
http://code.activestate.com/recipes/65211-convert-a-string-into-a-raw-string/
It seems that Jenkins is the ghost of the affair.
How Jenkins handles Windows batch command