Skip to content

Commit

Permalink
Merge pull request #1251 from Bastian-Krause/bst/USBNetworkInterface-…
Browse files Browse the repository at this point in the history
…ifname

resource/udev: warn on initializing USBNetworkInterface with ifname
  • Loading branch information
Emantor committed Jul 28, 2023
2 parents c5b7776 + 4228d2a commit abf75d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions labgrid/resource/udev.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,11 @@ class USBNetworkInterface(USBResource, NetworkInterface):
def __attrs_post_init__(self):
self.match['SUBSYSTEM'] = 'net'
self.match['@SUBSYSTEM'] = 'usb'
if self.ifname:
warnings.warn(
"USBNetworkInterface: The ifname attribute will be overwritten by udev.\n"
"Please use udev matching as described in http://labgrid.readthedocs.io/en/latest/configuration.html#udev-matching" # pylint: disable=line-too-long
)
super().__attrs_post_init__()

def update(self):
Expand Down

0 comments on commit abf75d7

Please sign in to comment.