add some clarification comment

This commit is contained in:
Istvan Ruzman
2020-09-04 19:14:09 +02:00
parent be540bdfd3
commit 47d75ab686

View File

@@ -124,9 +124,10 @@ def pre_parse_attributes( # pylint: disable=too-many-branches
else: else:
modifier = 2 modifier = 2
# Redundand in the "normal" case # Redundand in the "normal" case
tmp_attributes = [(key, value, offset + modifier,)] tmp_attributes = [(key, value, offset + modifier)]
except (KeyError, IndexError): except (KeyError, IndexError):
# We do not know the TLV, but the packet seems to be well-formed so far # We do not know the TLV, but the packet seems to be well-formed so far
# RFC recommends to treat unknown Attributes as transparently as blobs
tmp_attributes = [(key, value, offset + 2)] tmp_attributes = [(key, value, offset + 2)]
for key, value, offset in tmp_attributes: for key, value, offset in tmp_attributes: