Skip to content

Commit afcfb67

Browse files
committed
Fixes #1. KeyError on missing Loopback interface type.
1 parent 94ef45d commit afcfb67

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

NetworkManager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ def device_class(typ):
395395
NM_DEVICE_TYPE_WIREGUARD: WireGuard,
396396
NM_DEVICE_TYPE_VRF: Vrf,
397397
NM_DEVICE_TYPE_WIFI_P2P: WifiP2p,
398+
NM_DEVICE_TYPE_LOOPBACK: Loopback,
398399
}[typ]
399400

400401
class Adsl(Device): pass
@@ -426,6 +427,7 @@ class SixLoWpan(Device): pass
426427
class WireGuard(Device): pass
427428
class WifiP2p(Device): pass
428429
class Vrf(Device): pass
430+
class Loopback(Device): pass
429431

430432
class NSP(TransientNMDbusInterface):
431433
interface_names = ['org.freedesktop.NetworkManager.Wimax.NSP']
@@ -814,6 +816,7 @@ def cert_to_dbus(cert):
814816
NM_DEVICE_TYPE_WIREGUARD = 29
815817
NM_DEVICE_TYPE_WIFI_P2P = 30
816818
NM_DEVICE_TYPE_VRF = 31
819+
NM_DEVICE_TYPE_LOOPBACK = 32
817820
NM_DEVICE_CAP_NONE = 0
818821
NM_DEVICE_CAP_NM_SUPPORTED = 1
819822
NM_DEVICE_CAP_CARRIER_DETECT = 2

README

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ python-networkmanager
66
If you are looking for an alternative, please try
77
https://github.com/python-sdbus/python-sdbus-networkmanager
88

9-
If python-sdbus-networkmanager does not fit your needs, and you wish to revive this project, please
10-
contact me.
9+
If python-sdbus-networkmanager does not fit your needs, and you wish to revive this project, please contact @seveas.

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
from setuptools import setup
44

55
setup(name = "python-networkmanager",
6-
version = "2.2",
6+
version = "2.2.1",
77
author = "Dennis Kaarsemaker",
88
author_email = "dennis@kaarsemaker.net",
9-
url = "http://github.com/seveas/python-networkmanager",
9+
url = "http://github.com/snstac/python-networkmanager",
1010
description = "Easy communication with NetworkManager",
1111
py_modules = ["NetworkManager"],
1212
install_requires = ["dbus-python", "six"],

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy