summaryrefslogtreecommitdiffstats
path: root/python/netlink
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2013-09-05 12:11:25 (GMT)
committerThomas Graf <tgraf@suug.ch>2013-09-05 15:46:00 (GMT)
commit672689513316dcadffd70b0e68418a2e1f4e7f87 (patch)
treeec498af7c79419025ad17a8c8f6c9281a05f9176 /python/netlink
parentfa23414013aa23bb5490d791d788be65a50d5ba6 (diff)
downloadlibnl-672689513316dcadffd70b0e68418a2e1f4e7f87.zip
libnl-672689513316dcadffd70b0e68418a2e1f4e7f87.tar.gz
libnl-672689513316dcadffd70b0e68418a2e1f4e7f87.tar.bz2
python: fix typo in Socket::__str__() function
The property name used in __str__ should be local_port instead of localPort to get rid of the AttributeError. >>> str(s) Traceback (most recent call last): File "<stdin>", line 1, in <module> File ".../netlink/core.py", line 172, in __str__ return 'nlsock<{0}>'.format(self.localPort) AttributeError: 'Socket' object has no attribute 'localPort' Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'python/netlink')
-rw-r--r--python/netlink/core.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/netlink/core.py b/python/netlink/core.py
index 89773f6..886ae2a 100644
--- a/python/netlink/core.py
+++ b/python/netlink/core.py
@@ -198,7 +198,7 @@ class Socket(object):
capi.nl_socket_free(self._sock)
def __str__(self):
- return 'nlsock<{0}>'.format(self.localPort)
+ return 'nlsock<{0}>'.format(self.local_port)
@property
def local_port(self):