Always use python3

pull/959/head
Piero Toffanin 2021-01-24 14:14:23 -05:00 zatwierdzone przez GitHub
rodzic 7443ca72a0
commit 076d24d49c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -102,9 +102,9 @@ class GrassContext:
env["PYTHONPATH"] = "%s%s%s" % (self.python_path, sep, env.get("PYTHONPATH", ""))
# Execute it
logger.info("Executing grass script from {}: {} -c {} location --exec python {} {}".format(self.get_cwd(), self.grass_binary, self.location, script, " ".join(params)))
logger.info("Executing grass script from {}: {} -c {} location --exec python3 {} {}".format(self.get_cwd(), self.grass_binary, self.location, script, " ".join(params)))
command = [self.grass_binary, '-c', self.location, 'location', '--exec', 'python', script] + params
command = [self.grass_binary, '-c', self.location, 'location', '--exec', 'python3', script] + params
if platform.system() == "Windows":
# communicate() hangs on Windows so we use check_output instead
try:
@ -151,4 +151,4 @@ def cleanup_grass_context(serialized_context):
ctx = grass.create_context(serialized_context)
ctx.cleanup()
grass = GrassEngine()
grass = GrassEngine()