From: Arend van Spriel Date: Thu, 5 Sep 2013 12:11:25 +0000 (+0200) Subject: python: fix typo in Socket::__str__() function X-Git-Tag: libnl3_2_23rc1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=672689513316dcadffd70b0e68418a2e1f4e7f87;p=thirdparty%2Flibnl.git 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 "", line 1, in 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 Signed-off-by: Thomas Graf --- 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):