Skip to content

Commit

Permalink
Fix exception handling in python3
Browse files Browse the repository at this point in the history
  • Loading branch information
r4f4 committed Oct 26, 2017
1 parent fbbe6d6 commit 6be6e2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/bcc/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,15 +527,15 @@ def _open_perf_buffer(self, cpu, callback, page_cnt, lost_cb):
def raw_cb_(_, data, size):
try:
callback(cpu, data, size)
except IOError, e:
except IOError as e:
if e.errno == errno.EPIPE:
exit()
else:
raise e
def lost_cb_(lost):
try:
lost_cb(lost)
except IOError, e:
except IOError as e:
if e.errno == errno.EPIPE:
exit()
else:
Expand Down

0 comments on commit 6be6e2c

Please sign in to comment.