On 2020/06/15 21:38, C. Michael Pilato wrote:
> Reviewed, tested, and compared with similar Python3 conversions to other
> scripts. All looks good, so committed it:
> Sending backup/hot-backup.py.in
> Transmitting file data .done
> Committing transaction...
> Committed revision 1878855.
Is it needed something like this?
--- tools/backup/hot-backup.py.in (revision 1878855)
+++ tools/backup/hot-backup.py.in (working copy)
@@ -218,7 +218,7 @@
raise Exception("Unable to find the youngest revision for repository '%s'"
- ": %s" % (repo_dir, stderr_lines.rstrip()))
+ ": %s" % (repo_dir, stderr_lines.rstrip().decode()))
If svnlook runs on locale other than C, this can cause UnicodeDecodeError,
but without applying it, the output from svnlook is embeded as a representaion
of bytes object to the exception message, like b'...'.
(Although I think this script assuming C locale implicitly.)
So I'm not sure which is better applying this or not.
'return stdout_lines.strip().decode();' is okey (except an extra ';',
but it is not critical), because stdout_lines is always ascii string
in this context.
Yasuhito FUTATSUKI <futatuki_at_yf.bsclub.org>
Received on 2020-06-15 16:32:23 CEST