Closed GoogleCodeExporter closed 9 years ago
When get_version() is run on Windows it calls out to the Tortoise SVN command
'SubWCRev.exe'. This produces the output in the description above to stdout,
which is ignored.
Changing the call out to 'SubWCRev.exe' to use the subprocess module, which
allows the setting of stdout to a file descriptor. In this case the file
descriptor will be os.devnull as the output does not need to be captured.
The existing logic to check for a non-zero error code can be replicated like so:
# Run conversion
cmd = ['SubWCRev.exe', '.', file_in, file_out]
fnull = open(os.devnull, 'w')
try:
# Suppress stdout and stderr by piping to devnull
subprocess.check_call(cmd, stdout=fnull, stderr=fnull)
fnull.close()
except:
fnull.close()
# Delete files
The rest of the function is the same as before.
Original comment by b...@girorosso.com
on 29 May 2012 at 5:08
This is implemented in revision 1132.
Original comment by b...@girorosso.com
on 29 May 2012 at 5:40
Original issue reported on code.google.com by
Vanessa....@gmail.com
on 29 May 2012 at 4:56