Skip to content
Permalink
Browse files

[processing] fix to avoid interrupted system call exceptions in mac

  • Loading branch information
volaya committed May 23, 2016
1 parent f0527e4 commit 9074b14a740f594b3899d8eea86e18c33118eb83
@@ -30,6 +30,7 @@

import os
import re
import time
from qgis.PyQt.QtCore import QCoreApplication
from qgis.core import QgsApplication
import subprocess
@@ -160,6 +161,8 @@ def executeOtb(commands, progress, addToLog=True):
os.putenv('ITK_AUTOLOAD_PATH', otbLibPath())
fused_command = ''.join(['"%s" ' % re.sub(r'^"|"$', '', c) for c in commands])
proc = subprocess.Popen(fused_command, shell=True, stdout=subprocess.PIPE, stdin=open(os.devnull), stderr=subprocess.STDOUT, universal_newlines=True).stdout
if isMac(): #This trick avoids having an uninterrupted system call exception if OTB is not installed
time.sleep(1)
for line in iter(proc.readline, ""):
if "[*" in line:
idx = line.find("[*")
@@ -28,6 +28,7 @@
import os
import stat
import subprocess
import time

from qgis.PyQt.QtCore import QCoreApplication
from qgis.core import QgsApplication
@@ -133,6 +134,8 @@ def getSagaInstalledVersion(runSaga=False):
stderr=subprocess.STDOUT,
universal_newlines=True,
).stdout
if isMac(): #This trick avoids having an uninterrupted system call exception if SAGA is not installed
time.sleep(1)
try:
lines = proc.readlines()
for line in lines:

1 comment on commit 9074b14

@m-kuhn

This comment has been minimized.

Copy link
Member

@m-kuhn m-kuhn commented on 9074b14 May 23, 2016

I had a similar issue here, I think it would be nice to align the workaround but I am not sure which one is better
09a2f9b

Please sign in to comment.
You can’t perform that action at this time.