Changeset: 7f5df196c32e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7f5df196c32e
Modified Files:
        testing/Mtest.py.in
Branch: Jul2015
Log Message:

Work around strange behavior of urllib.pathnam2url on Windows.


diffs (19 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -598,9 +598,12 @@ import urllib
 path = urllib.url2pathname
 ### path(str) #
 
-##def url(str) :
-##    return str.replace(os.sep, '/')
-url = urllib.pathname2url
+def url(str) :
+    url = urllib.pathname2url(str)
+    # on Windows, C:\tmp\foo becomes ///C:/tmp/foo, turn into /C:/tmp/foo
+    if url.startswith('///'):
+        url = url[2:]
+    return url
 ### url(str) #
 
 def try_open(path, mode) :
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to