DataTLV is not subscriptable

This commit is contained in:
Yohann D'ANELLO 2021-01-09 20:52:17 +01:00
parent 8f3b7cd9d2
commit d8cabcc6a3
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ class DataTLV(TLV):
self.nonce = socket.ntohl(int.from_bytes(raw_data[10:14], sys.byteorder)) self.nonce = socket.ntohl(int.from_bytes(raw_data[10:14], sys.byteorder))
self.data = raw_data[14:len(self)] self.data = raw_data[14:len(self)]
if self.data[-1] == 0: if self.data[-1] == 0:
self.data = self[:-1] self.data = self.data[:-1]
def marshal(self) -> bytes: def marshal(self) -> bytes:
return self.type.to_bytes(1, sys.byteorder) + \ return self.type.to_bytes(1, sys.byteorder) + \