aboutsummaryrefslogtreecommitdiffstats
path: root/test/util_dump_dhcp_pcap.py
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-10-13 18:08:43 +0200
committerPeter Wu <peter@lekensteyn.nl>2018-11-08 16:36:35 +0000
commit7f2cf2fccaff3cbdfc0f3a43a10667269f4ea4f6 (patch)
treed8de71c0e1827211af73ba6058540a9cdfe763b6 /test/util_dump_dhcp_pcap.py
parent50a0a78bd0a821c9b2904db7ff1e2a306d6f2183 (diff)
test: drop Python 2 compatibility, use more Python 3 features
Reduces maintenance costs and makes it possible to simplify code. pytest supports Python 2.7 and Python 3.4 (or newer), so that is more or less the minimum target for now. Change-Id: I0347b6c334bf2fc6c9480ff56e9ccfcd48886dde Reviewed-on: https://code.wireshark.org/review/30193 Tested-by: Petri Dish Buildbot Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'test/util_dump_dhcp_pcap.py')
-rwxr-xr-xtest/util_dump_dhcp_pcap.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/test/util_dump_dhcp_pcap.py b/test/util_dump_dhcp_pcap.py
index 2fbd7fa138..2e0b242818 100755
--- a/test/util_dump_dhcp_pcap.py
+++ b/test/util_dump_dhcp_pcap.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Wireshark tests
# By Gerald Combs <gerald@wireshark.org>
@@ -21,10 +21,6 @@ def main():
help='cat: Just dump the file. slow: Dump the file, pause, and dump its packet records. raw: Dump only the packet records.')
args = parser.parse_args()
- if sys.version_info[0] < 3 and sys.platform == "win32":
- import msvcrt
- msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
-
dhcp_pcap = os.path.join(os.path.dirname(__file__), 'captures', 'dhcp.pcap')
dhcp_fd = open(dhcp_pcap, 'rb')