diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-05-03 12:06:52 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2018-05-03 19:45:36 +0000 |
commit | 751e9463ce5588631514573354c704171792c7db (patch) | |
tree | d131c8af076c3bae0282827cb2d8f9503d327b58 /test | |
parent | 83b8c9c9886d3025c7e7559104d1302b84f32c3a (diff) |
Test: Fix default capture interface discovery.
Change-Id: Id033a0e4e1e81ae9e84774b2d76f95049a2e2b3a
Reviewed-on: https://code.wireshark.org/review/27315
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/config.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/config.py b/test/config.py index 17f9f66677..0ff2698d06 100644 --- a/test/config.py +++ b/test/config.py @@ -118,8 +118,12 @@ def getDefaultCaptureInterface(): if not sys.platform.startswith('win32'): return try: - dumpcap_d_blob = str(subprocess.check_output((cmd_dumpcap, '-D'), stderr=subprocess.PIPE)) - for d_line in dumpcap_d_blob.splitlines(): + dumpcap_d_data = subprocess.check_output((cmd_dumpcap, '-D'), stderr=subprocess.PIPE) + if sys.version_info[0] >= 3: + dumpcap_d_stdout = dumpcap_d_data.decode('UTF-8', 'replace') + else: + dumpcap_d_stdout = unicode(dumpcap_d_data, 'UTF-8', 'replace') + for d_line in dumpcap_d_stdout.splitlines(): iface_m = re.search('(\d+)\..*(Ethernet|Network Connection|VMware|Intel)', d_line) if iface_m: capture_interface = iface_m.group(1) |