diff --git a/edosl0util/stream.py b/edosl0util/stream.py index cf5bde3e564ba6031d92fa830cc6913413ac3eef..6b26b2006bd2326f2b4a0fcd13cb124da6dfcc70 100644 --- a/edosl0util/stream.py +++ b/edosl0util/stream.py @@ -42,8 +42,8 @@ class NonConsecutiveSeqId(Error): class BasicStream(object): """ - Basic packet stream iterator that reads the primary and secondary headers and - maintains offsets and read sizes. + Basic packet stream iterator that reads the primary and secondary headers + and maintains offsets and read sizes. """ Tracker = namedtuple('Tracker', ['h1', 'h2', 'size', 'offset', 'data']) @@ -142,9 +142,12 @@ class Packet(object): def is_first(self): return self.primary_header.sequence_grouping == GROUP_FIRST - def is_continuine(self): + def is_continuing(self): return self.primary_header.sequence_grouping == GROUP_CONTINUING + # compatibility + is_continuine = is_continuing + def is_last(self): return self.primary_header.sequence_grouping == GROUP_LAST @@ -155,7 +158,8 @@ class Packet(object): class PacketStream(object): SEQID_NOTSET = -1 - def __init__(self, data_stream, fail_on_missing=False, fail_on_tooshort=False): + def __init__(self, data_stream, fail_on_missing=False, + fail_on_tooshort=False): """ :param data_stream: An interable of ``Tracker`` objects :keyword fail_on_missing: