----- Original Message -----
> [75%] 536 1s ... - output mismatch (see 536.out.bad)
> 68a69,72
> > Traceback (most recent call last):
> > File "/usr/bin/pmiostat", line 228, in <module>
> > except BrokenPipeError:
> > NameError: name 'BrokenPipeError' is not defined
> 74a79,82
> > Traceback (most recent call last):
> > File "/usr/bin/pmiostat", line 228, in <module>
> > except BrokenPipeError:
> > NameError: name 'BrokenPipeError' is not defined
>
This seems to be one both-python-2-and-3-friendly way of doing this...
does it fix the problem there?
diff --git a/src/pcp/iostat/pcp-iostat.py b/src/pcp/iostat/pcp-iostat.py
index 594a311..20cb8c2 100755
--- a/src/pcp/iostat/pcp-iostat.py
+++ b/src/pcp/iostat/pcp-iostat.py
@@ -16,6 +16,7 @@
""" Display disk and device-mapper I/O statistics """
import sys
+import socket
from pcp import pmapi, pmcc
from cpmapi import PM_TYPE_U64, PM_CONTEXT_ARCHIVE, PM_SPACE_KBYTE
@@ -225,5 +226,5 @@ if __name__ == '__main__':
sys.exit(1)
except KeyboardInterrupt:
pass
- except BrokenPipeError:
+ except socket.error:
pass
cheers.
--
Nathan
|