From ac6dd4feb90f775fbf4ae2303e0c6161f39497c6 Mon Sep 17 00:00:00 2001 From: Pierre LALET <pierre.lalet@cea.fr> Date: Wed, 4 Jan 2017 10:07:01 +0100 Subject: [PATCH] Get constant values from "consts" since it is no longer in arch --- scapy/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scapy/utils.py b/scapy/utils.py index b26faf05..1215c69b 100644 --- a/scapy/utils.py +++ b/scapy/utils.py @@ -18,12 +18,11 @@ import warnings warnings.filterwarnings("ignore","tempnam",RuntimeWarning, __name__) from scapy.config import conf +from scapy.consts import DARWIN, WINDOWS from scapy.data import MTU from scapy.error import log_runtime,log_loading,log_interactive, Scapy_Exception from scapy.base_classes import BasePacketList -WINDOWS=sys.platform.startswith("win32") - ########### ## Tools ## ########### @@ -1148,7 +1147,7 @@ u'64' stdout=subprocess.PIPE if dump or getfd else None, stderr=open(os.devnull), ) - elif sys.platform.startswith("darwin"): + elif DARWIN: # Tcpdump cannot read from stdin, see # <http://apple.stackexchange.com/questions/152682/> tmpfile = tempfile.NamedTemporaryFile(delete=False) -- GitLab