title: Taking a long time to execute a saltstack command using python
body: <p>I was trying to execute this saltstack command 
  <code>cmd = "/usr/local/bin/salt -L 'target' cp.get_dir salt://allapps/V001 /u02/tomcat-8.0.24/8080/webapps/" 
  output = os.popen(cmd).readlines()</code> using python.
  I have started 8 threads in parallel to run this command, but each thread costs about 5 min to finish.
  But I run this command in terminal or python console standalone, it just takes me about 2-3 secs to complete.
  First I thought it was because of readlines() consuming lots of memory, but it still costs 5 min more to finish when I removed readlines() just to run the shell command with os.popen(). 
  I have no idea why it takes so much time to run this command, any solutions to this? Thx guys </p>
  
  <p>I have found that it consumes around 5 sec to execute <code>output = os.popen("/usr/local/bin/salt -L 'target' cp.get_dir salt://allapps/V001 /u02/tomcat-8.0.24/8080/webapps/")</code> other than <code>output = os.popen(cmd)</code>.
  The variable <code>cmd</code> is exactly the same with <code>"/usr/local/bin/salt -L 'target' cp.get_dir salt://allapps/V001 /u02/tomcat-8.0.24/8080/webapps/"</code>.
  Why there is so much difference?</p>