code: def call(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
           on_error='ignore', returncode=False):
      
      # start external command process
      p = subprocess.Popen(command, stdout=subprocess.PIPE,
                           stderr=subprocess.PIPE)
  
      # get outputs
      out, _ = p.communicate()
  
      # throw exception if process failed
      if p.returncode != 0 and on_error == 'raise':
          raise GitInvocationError('Failed to run "%s"' % " ".join(command))
  
      if returncode:
          return out.strip(), p.returncode
      else:
          return out.strip()
docs: Run the given command (with shell=False) and return the output as a
      string.
  
      Strips the output of enclosing whitespace.
  
      If the return code is non-zero, throw GitInvocationError.