title: how to find if svn command executed successfully or not in python
body: <p>I am executing svn commands (assume I do not want to use pysvn) from my python script in the following manner (for example):</p>
  
  <pre><code>cmd = 'svn update http://myserver/myrepo'
  p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
      output, stderr = p.communicate()      
      status = p.returncode
      if status != 0: 
          logging.error('A fatal has error occurred while executing command: ' + cmd)
          exit(-1)
  </code></pre>
  
  <p>Let's say myrepo does NOT exists on the server. It this case SVN will silently produces output like:    </p>
  
  <pre><code>Skipped http://myserver/myrepo
  </code></pre>
  
  <p>and the status variable has the value '0'. Is there a way I can detect via the return code to check if SVN update skipped or in fact did update the repo successfully?</p>
  
  <p>For now, I am using the following solution but not sure if it is an elegant one:</p>
  
  <pre><code>if 'Skipped' in output:
      logging.error('SVN update failed!')
      exit(-1)
  </code></pre>