From 8b9083836d0d3076c21ee32a4c37dcc7ee53f481 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 21 Dec 2012 19:05:33 +0100 Subject: [PATCH] test: Handle IO exceptions from PBAP client --- test/pbap-client | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/pbap-client b/test/pbap-client index ac1d41dbe..a38b3ccc4 100755 --- a/test/pbap-client +++ b/test/pbap-client @@ -52,11 +52,14 @@ class PbapClient: return self.transfers -= 1 print "Transfer %s complete" % path - f = open(req.filename, "r") - os.remove(req.filename) - lines = f.readlines() - del self.props[path] - req.callback_func(lines) + try: + f = open(req.filename, "r") + os.remove(req.filename) + lines = f.readlines() + del self.props[path] + req.callback_func(lines) + except: + pass if (len(self.props) == 0) and (self.transfers == 0): if self.flush_func != None: -- 2.47.3