KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using Python to automate an SVN commit, and I want to write the SVN command's output to a log file. The code that I have can make SVN run, but the problem is that on a successful commit, the subprocess invocation does not return any output for my log. When I run SVN manually, by comparison, I get output that shows the progress of the command and shows which files are being committed. That's what I want in my log file. Is SVN outputting that data to a buffer than stdout or stderr? How can I capture that data for my log? Here's the code I'm using: cmd = "svn commit --non-interactive --no-auth-cache -m 'Automatic commit' ./" process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) result = process.wait() # Output out = process.stdout.read() err = process.stderr.read() When I run this code and the commit is successful, the out and err variables are both empty.
Tags (comma-separated)
Save Edits
Cancel