def unpackFlags(self, flags): ''' Unpacks all the flag fields from a single two char hex string ''' values = unpackByte(fmt='11111111', byte=int(flags, 16), boolean=True) for i, field in enumerate(raeting.PACKET_FLAG_FIELDS): if field in self.packet.data: self.packet.data[field] = values[i]