From 91854478b4d47774d8f3c7eea54ede39e9c7534f Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 11 May 2021 15:43:39 -0400 Subject: [PATCH] Fix quotes on Windows --- opendm/entwine.py | 6 +++--- opendm/remote.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/opendm/entwine.py b/opendm/entwine.py index da2de87c..04ec3b4d 100644 --- a/opendm/entwine.py +++ b/opendm/entwine.py @@ -1,7 +1,7 @@ import os import sys import shutil -from pipes import quote +from opendm.utils import double_quote from opendm import io from opendm import log from opendm import system @@ -48,7 +48,7 @@ def build_entwine(input_point_cloud_files, tmpdir, output_path, max_concurrency= kwargs = { 'threads': max_concurrency, 'tmpdir': tmpdir, - 'all_inputs': "-i " + " ".join(map(quote, input_point_cloud_files)), + 'all_inputs': "-i " + " ".join(map(double_quote, input_point_cloud_files)), 'outputdir': output_path } @@ -61,7 +61,7 @@ def build_untwine(input_point_cloud_files, tmpdir, output_path, max_concurrency= kwargs = { # 'threads': max_concurrency, 'tmpdir': tmpdir, - 'files': "--files " + " ".join(map(quote, input_point_cloud_files)), + 'files': "--files " + " ".join(map(double_quote, input_point_cloud_files)), 'outputdir': output_path } diff --git a/opendm/remote.py b/opendm/remote.py index 8ab94002..89e22af3 100644 --- a/opendm/remote.py +++ b/opendm/remote.py @@ -13,7 +13,7 @@ from pyodm import Node, exceptions from pyodm.utils import AtomicCounter from pyodm.types import TaskStatus from opendm.osfm import OSFMContext, get_submodel_args_dict, get_submodel_argv -from pipes import quote +from opendm.utils import double_quote try: import queue @@ -474,7 +474,7 @@ class ToolchainTask(Task): argv = get_submodel_argv(config.config(), submodels_path, submodel_name) # Re-run the ODM toolchain on the submodel - system.run(" ".join(map(quote, map(str, argv))), env_vars=os.environ.copy()) + system.run(" ".join(map(double_quote, map(str, argv))), env_vars=os.environ.copy()) # This will only get executed if the command above succeeds self.touch(completed_file)