diff --git a/m3u8/model.py b/m3u8/model.py index bb09be5c..f06fc3fc 100644 --- a/m3u8/model.py +++ b/m3u8/model.py @@ -361,7 +361,7 @@ def __init__(self, uri, base_uri, program_date_time=None, duration=None, self.byterange = byterange self.program_date_time = program_date_time self.discontinuity = discontinuity - self.key = Key(base_uri=base_uri,**key) if key else None + self.key = Key(base_uri=base_uri,**key) if key and 'uri' in key else None def dumps(self, last_segment):