Skip to content

Commit 99073f1

Browse files
committed
Add the Generic device type
1 parent 9a41241 commit 99073f1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NetworkManager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ def SpecificDevice(self):
232232
NM_DEVICE_TYPE_VLAN: Vlan,
233233
NM_DEVICE_TYPE_ADSL: Adsl,
234234
NM_DEVICE_TYPE_BRIDGE: Bridge,
235+
NM_DEVICE_TYPE_GENERIC: Generic
235236
}[self.DeviceType](self.object_path)
236237

237238
def postprocess(self, name, val):
@@ -284,6 +285,9 @@ class Vlan(NMDbusInterface):
284285
class Adsl(NMDbusInterface):
285286
interface_name = 'org.freedesktop.NetworkManager.Device.adsl'
286287

288+
class Generic(NMDbusInterface):
289+
interface_name = 'org.freedesktop.NetworkManager.Device.Generic'
290+
287291
class NSP(NMDbusInterface):
288292
interface_name = 'org.freedesktop.NetworkManager.Wimax.NSP'
289293

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ interface.
127127

128128
.. class:: Adsl
129129

130+
.. class:: Generic
131+
130132
These classes represent D-Bus interfaces for various types of hardware. Note
131133
that methods such as :data:`NetworkManager.GetDevices()` will only return
132134
:class:`Device` instances. To get the hardware-specific class, you can call the

0 commit comments

Comments
 (0)