Commit 6b511bd9 authored by yonghong-song's avatar yonghong-song Committed by GitHub

Merge pull request #1413 from r4f4/fix-exception-py3

Fix exception handling in python3
parents fbbe6d6e 6be6e2c0
......@@ -527,7 +527,7 @@ class PerfEventArray(ArrayBase):
def raw_cb_(_, data, size):
try:
callback(cpu, data, size)
except IOError, e:
except IOError as e:
if e.errno == errno.EPIPE:
exit()
else:
......@@ -535,7 +535,7 @@ class PerfEventArray(ArrayBase):
def lost_cb_(lost):
try:
lost_cb(lost)
except IOError, e:
except IOError as e:
if e.errno == errno.EPIPE:
exit()
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment