interconnect/stream: allow empty description/payload on Endpoint.

This commit is contained in:
Florent Kermarrec 2020-07-03 19:29:05 +02:00
parent 2f6b27da23
commit e6b94b1663
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ def set_reset_less(field):
s.reset_less = True s.reset_less = True
class EndpointDescription: class EndpointDescription:
def __init__(self, payload_layout, param_layout=[]): def __init__(self, payload_layout=[], param_layout=[]):
self.payload_layout = payload_layout self.payload_layout = payload_layout
self.param_layout = param_layout self.param_layout = param_layout
@ -59,7 +59,7 @@ class EndpointDescription:
class Endpoint(Record): class Endpoint(Record):
def __init__(self, description_or_layout, name=None, **kwargs): def __init__(self, description_or_layout=[], name=None, **kwargs):
if isinstance(description_or_layout, EndpointDescription): if isinstance(description_or_layout, EndpointDescription):
self.description = description_or_layout self.description = description_or_layout
else: else: