Skip to content

Commit 4af29f2

Browse files
committed
Merge tag '0.9.12' into debian
2 parents cd96156 + d4b8df2 commit 4af29f2

5 files changed

Lines changed: 21 additions & 9 deletions

File tree

NetworkManager.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ def __init__(self, object_path=None):
5050
setattr(self.__class__, p, self._make_property(p))
5151

5252
def _make_property(self, name):
53-
def get(self):
53+
def get_func(self):
5454
data = self.proxy.Get(self.interface_name, name, dbus_interface='org.freedesktop.DBus.Properties')
5555
debug("Received property %s.%s" % (self.interface_name, name), data)
5656
return self.postprocess(name, self.unwrap(data))
57-
def set(self, value):
58-
data = self.wrap(self.preprocess(name, data))
57+
def set_func(self, value):
58+
value = self.wrap(self.preprocess(name, (value,), {})[0][0])
5959
debug("Setting property %s.%s" % (self.interface_name, name), value)
6060
return self.proxy.Set(self.interface_name, name, value, dbus_interface='org.freedesktop.DBus.Properties')
61-
return property(get, set)
61+
return property(get_func, set_func)
6262

6363
def unwrap(self, val):
6464
if isinstance(val, dbus.ByteArray):
@@ -211,6 +211,7 @@ def SpecificDevice(self):
211211
NM_DEVICE_TYPE_BOND: Bond,
212212
NM_DEVICE_TYPE_VLAN: Vlan,
213213
NM_DEVICE_TYPE_ADSL: Adsl,
214+
NM_DEVICE_TYPE_BRIDGE: Bridge,
214215
}[self.DeviceType](self.object_path)
215216

216217
def postprocess(self, name, val):
@@ -392,6 +393,11 @@ def route_to_dbus(route):
392393
NM_STATE_CONNECTED_LOCAL = 50
393394
NM_STATE_CONNECTED_SITE = 60
394395
NM_STATE_CONNECTED_GLOBAL = 70
396+
NM_CONNECTIVITY_UNKNOWN = 0
397+
NM_CONNECTIVITY_NONE = 1
398+
NM_CONNECTIVITY_PORTAL = 2
399+
NM_CONNECTIVITY_LIMITED = 3
400+
NM_CONNECTIVITY_FULL = 4
395401
NM_DEVICE_TYPE_UNKNOWN = 0
396402
NM_DEVICE_TYPE_ETHERNET = 1
397403
NM_DEVICE_TYPE_WIFI = 2
@@ -549,3 +555,9 @@ def route_to_dbus(route):
549555
NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED = 0
550556
NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED = 1
551557
NM_VPN_PLUGIN_FAILURE_BAD_IP_CONFIG = 2
558+
NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED = 0
559+
NM_SECRET_AGENT_ERROR_INVALID_CONNECTION = 1
560+
NM_SECRET_AGENT_ERROR_USER_CANCELED = 2
561+
NM_SECRET_AGENT_ERROR_AGENT_CANCELED = 3
562+
NM_SECRET_AGENT_ERROR_INTERNAL_ERROR = 4
563+
NM_SECRET_AGENT_ERROR_NO_SECRETS = 5

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
# The short X.Y version.
5151
version = '0.9'
5252
# The full version, including alpha/beta/rc tags.
53-
release = '0.9.11'
53+
release = '0.9.12'
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ translate them to text. For example:
7171
>>> NetworkManager.const('device_type', 2)
7272
'wifi'
7373
74-
.. _`NetworkManager project website`: projects.gnome.org/NetworkManager/developers/api/09/spec.html
74+
.. _`NetworkManager project website`: https://developer.gnome.org/NetworkManager/0.9/spec.html
7575

7676
List of classes
7777
---------------

makeconstants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
enum_regex = re.compile(r'typedef enum(?:\s+[a-zA-Z]+)?\s*\{(.*?)\}', re.DOTALL)
77
comment_regex = re.compile(r'/\*.*?\*/', re.DOTALL)
88
headers = ['/usr/include/NetworkManager/NetworkManager.h',
9-
'/usr/include/NetworkManager/NetworkManagerVPN.h']
9+
'/usr/include/NetworkManager/NetworkManagerVPN.h',
10+
'/usr/include/libnm-glib/nm-secret-agent.h']
1011
for h in headers:
1112
for enum in enum_regex.findall(open(h).read()):
1213
enum = comment_regex.sub('', enum)
@@ -22,4 +23,3 @@
2223
key = key.strip()
2324
print('%s = %d' % (key, val))
2425
last = val
25-

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from distutils.core import setup
44

55
setup(name = "python-networkmanager",
6-
version = "0.9.11",
6+
version = "0.9.12",
77
author = "Dennis Kaarsemaker",
88
author_email = "dennis@kaarsemaker.net",
99
url = "http://github.com/seveas/python-networkmanager",

0 commit comments

Comments
 (0)