Author: futatuki
Date: Sat Sep 28 15:27:20 2019
New Revision: 1867679
URL: http://svn.apache.org/viewvc?rev=1867679&view=rev
Log:
On branch swig-py3: A follow-up to 1867653: Keep simple code in conditional
block
* subversion/bindings/swig/python/tests/utils.py (file_uri_for_path):
Factor out call of pathname2url() into out of conditional block.
Patched by: brane
Modified:
subversion/branches/swig-py3/subversion/bindings/swig/python/tests/utils.py
Modified:
subversion/branches/swig-py3/subversion/bindings/swig/python/tests/utils.py
URL:
http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/swig/python/tests/utils.py?rev=1867679&r1=1867678&r2=1867679&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/bindings/swig/python/tests/utils.py
(original)
+++ subversion/branches/swig-py3/subversion/bindings/swig/python/tests/utils.py
Sat Sep 28 15:27:20 2019
@@ -80,9 +80,8 @@ class Temper(object):
def file_uri_for_path(path):
"""Return the file: URI corresponding to the given path."""
if isinstance(path, str):
- uri_path = pathname2url(path).encode('UTF-8')
- else:
- uri_path = pathname2url(path.decode('UTF-8')).encode('UTF-8')
+ path = path.decode('UTF-8')
+ uri_path = pathname2url(path).encode('UTF-8')
# pathname2url claims to return the path part of the URI, but on Windows
# it returns both the authority and path parts for no reason, which