Stefan Fuhrmann <[email protected]> writes:
> * subversion/tests/cmdline/svntest/actions.py
> (set_prop): If we write a bytes string to a prop, treat it as binary
> that can't be passed directly via command line argument.
[...]
> - if value and (value[0] == '-' or '\x00' in value or sys.platform ==
> 'win32'):
> + if value and (isinstance(value, bytes) or
> + (value[0] == '-' or '\x00' in value or sys.platform ==
> 'win32')):
> from tempfile import mkstemp
> (fd, value_file_path) = mkstemp()
> os.close(fd)
The new condition looks fairly suspicious.
What if someone calls set_prop('foo', '-') under Python 3? Or something like
set_prop('foo', 'bar'), but on Windows with Python 3? Is it going to raise
an error, because we'd try to pass a string to file.write() that expects
bytes?
Regards,
Evgeny Kotkov