[Libreoffice-commits] core.git: unotest/source
Stephan Bergmann
sbergman at redhat.com
Fri Apr 6 08:48:40 UTC 2018
unotest/source/python/org/libreoffice/unotest.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
New commits:
commit 04f4702eb896a330bc3b10443b7303a1d07d7a11
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Apr 6 09:00:08 2018 +0200
Fix Python file URL construction on Windows
...after d76281864b0e83812c0edf7490b1e8271e89fff5 "Create temp copies of test
docs in Python/UITests"
Change-Id: I4b6a5149c68f9e6cdc0a2037c07b50e8acc3623f
Reviewed-on: https://gerrit.libreoffice.org/52486
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/unotest/source/python/org/libreoffice/unotest.py b/unotest/source/python/org/libreoffice/unotest.py
index 1d0beb737ccb..222389af9e05 100644
--- a/unotest/source/python/org/libreoffice/unotest.py
+++ b/unotest/source/python/org/libreoffice/unotest.py
@@ -9,6 +9,7 @@
from __future__ import print_function
+import pathlib
import subprocess
import time
import uuid
@@ -217,11 +218,7 @@ class UnoInProcess:
return self.openDocFromAbsolutePath(path, asTemplate)
def openDocFromAbsolutePath(self, file, asTemplate = False):
- if os.name == "nt":
- url = "file:///" + file
- else:
- url = "file://" + file
- return self.openDocFromURL(url, asTemplate)
+ return self.openDocFromURL(pathlib.Path(file).as_uri(), asTemplate)
def openDocFromURL(self, url, asTemplate = False):
props = [("Hidden", True), ("ReadOnly", False), ("AsTemplate", asTemplate)]
More information about the Libreoffice-commits
mailing list