def samedir(self, pkt):
        if not self.socket:
            raise RuntimeError(
                'called tcp.Flow.samedir before direction is determined')
        src, dst = pkt.socket
        if self.socket == (src, dst):
            return True
        elif self.socket == (dst, src):
            return False
        else:
            raise ValueError(
                'TCPFlow.samedir found a packet from the wrong flow')
Progress will not raise a BadgeAlreadyAwardedException unless told
dataset/ETHPy150Open andrewf/pcap2har/pcap2har/tcp/flow.py/Flow.samedir--crossover with--dataset/ETHPy150Open mozilla/django-badger/badger/tests/test_badges_py.py/BadgesPyTest.test_progress_quiet_save