mirror of
https://github.com/openharmony/third_party_libnl.git
synced 2026-07-20 23:45:55 -04:00
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>
This commit is contained in:
committed by
Thomas Graf
parent
fa23414013
commit
6726895133
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user