Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit cdfe3cf

Browse files
committed
Only extract ethernet devices from ifconfig -a
1 parent 8b5eabf commit cdfe3cf

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

virtinst/util.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,11 @@ def get_host_network_devices():
186186
except IOError:
187187
continue
188188
for line in pipe:
189-
words = line.lower().split()
190-
for i in range(len(words)):
191-
if words[i] == "hwaddr":
192-
device.append(words)
189+
if line.find("encap:Ethernet") > 0:
190+
words = line.lower().split()
191+
for i in range(len(words)):
192+
if words[i] == "hwaddr":
193+
device.append(words)
193194
return device
194195

195196
def get_max_vcpus(conn):

0 commit comments

Comments
 (0)