udp: fix __str__ method and allow simple enumeration

This commit is contained in:
Roman Zeyde 2017-12-21 21:13:13 +02:00 committed by Pavol Rusnak
parent f8a277dfba
commit 31c4836073
1 changed files with 2 additions and 2 deletions

View File

@ -52,11 +52,11 @@ class UdpTransport(Transport):
self.socket = None self.socket = None
def __str__(self): def __str__(self):
return self.device return str(self.device)
@staticmethod @staticmethod
def enumerate(): def enumerate():
raise NotImplementedError('This transport cannot enumerate devices') return [UdpTransport()]
@staticmethod @staticmethod
def find_by_path(path=None): def find_by_path(path=None):