From fda12fb66d337322f8e5c52ca50eff30b2426d56 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 19 Dec 2014 21:26:23 +0100 Subject: [PATCH] Fix Python 3 compatibility in LocatePythonModule Regression introduced with cb345eb4bd0149b4a71d6069f957600a83cc3417. Change-Id: I625432ac4572d2449cb6981a158e46c560a81f1a Reviewed-on: https://code.wireshark.org/review/5883 Reviewed-by: Maarten Bezemer Reviewed-by: Alexis La Goutte --- cmake/modules/LocatePythonModule.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/LocatePythonModule.cmake b/cmake/modules/LocatePythonModule.cmake index 813cf25b53..efc6c3ff2e 100644 --- a/cmake/modules/LocatePythonModule.cmake +++ b/cmake/modules/LocatePythonModule.cmake @@ -29,7 +29,7 @@ function(LOCATE_PYTHON_MODULE module) # Use the (native) python impl module to find the location of the requested module execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" - "import imp; print imp.find_module('${module}')[1]" + "import imp; print(imp.find_module('${module}')[1])" RESULT_VARIABLE _${module}_status OUTPUT_VARIABLE _${module}_location ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)