Commit 6be6e2c0 authored by Rafael Fonseca's avatar Rafael Fonseca

Fix exception handling in python3

parent fbbe6d6e
......@@ -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