diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-12-21 19:05:33 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-12-21 19:05:33 +0100 |
commit | 8b9083836d0d3076c21ee32a4c37dcc7ee53f481 (patch) | |
tree | d1b169bcafd54767c3008a219dc1c99ecf6a9e3d /test/pbap-client | |
parent | c72af721b9e38501aa0d0d1f8095d7a9982da2de (diff) | |
download | bluez-8b9083836d0d3076c21ee32a4c37dcc7ee53f481.tar.gz |
test: Handle IO exceptions from PBAP client
Diffstat (limited to 'test/pbap-client')
-rwxr-xr-x | test/pbap-client | 13 |
1 files 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: |