Skip to content

Commit 63139e9

Browse files
syntronadeas31
andauthored
[DummyPopen] fix exception on timeout for wait() (#323)
* add try .. except .. for wait() Co-authored-by: Adeel Asghar <[email protected]>
1 parent f1e6d25 commit 63139e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

OMPython/OMCSession.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ def kill(self):
7474
return os.kill(self.pid, signal.SIGKILL)
7575

7676
def wait(self, timeout):
77-
return self.process.wait(timeout=timeout)
77+
try:
78+
self.process.wait(timeout=timeout)
79+
except psutil.TimeoutExpired:
80+
pass
7881

7982

8083
class OMCSessionException(Exception):

0 commit comments

Comments
 (0)