From cc4a3ae0cbdb2d86ce6480d030006c9592375baa Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 23 Mar 2011 03:48:13 +0000 Subject: Misc (re #1175): added protection against broken pipe exception in python unit test when handling error git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3475 74dad513-b988-da41-8d7b-12977e46ad98 --- tests/pjsua/run.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/pjsua/run.py b/tests/pjsua/run.py index 19b56376..d6d558b1 100644 --- a/tests/pjsua/run.py +++ b/tests/pjsua/run.py @@ -186,8 +186,12 @@ def handle_error(errmsg, t, close_processes = True): if (close_processes): time.sleep(1) for p in t.process: - p.send("q") - p.send("q") + # Protect against 'Broken pipe' exception + try: + p.send("q") + p.send("q") + except: + pass is_err = False try: ret = p.expect(const.DESTROYED, False) -- cgit v1.2.3