diff options
author | Benny Prijono <bennylp@teluu.com> | 2011-03-23 03:48:13 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2011-03-23 03:48:13 +0000 |
commit | cc4a3ae0cbdb2d86ce6480d030006c9592375baa (patch) | |
tree | 0a40d8dfb83203396b6b147bb095a1f4ac806ffa /tests/pjsua | |
parent | aebe1ccf0cc8b66a0a5142d48dc53cfe0eaa78af (diff) |
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
Diffstat (limited to 'tests/pjsua')
-rw-r--r-- | tests/pjsua/run.py | 8 |
1 files changed, 6 insertions, 2 deletions
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) |