From 01f71c71316cf6f95f2c74e79bd677cc3723eca7 Mon Sep 17 00:00:00 2001 From: gpotter2 <gabriel@potter.fr> Date: Sat, 13 May 2017 13:32:40 +0200 Subject: [PATCH] Fix broken pipe --- scapy/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scapy/utils.py b/scapy/utils.py index 7c2bc23d..be7a3bbd 100644 --- a/scapy/utils.py +++ b/scapy/utils.py @@ -436,7 +436,10 @@ def do_graph(graph,prog=None,format=None,target=None,type=None,string=None,optio format = "-T %s" % format w,r = os.popen2("%s %s %s %s" % (prog,options or "", format or "", target)) w.write(graph) - w.close() + try: + w.close() + except IOError: + pass if start_viewer: # Workaround for file not found error: We wait until tempfile is written. waiting_start = time.time() -- GitLab