From 631c1627fd2abc0b07cc2af0bf391caebd58a9f8 Mon Sep 17 00:00:00 2001 From: Phil <phil@secdev.org> Date: Sun, 8 Mar 2009 10:56:22 +0100 Subject: [PATCH] Fix NoPayload.__new__() object creation --- scapy/packet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scapy/packet.py b/scapy/packet.py index 8c31aa12..b96f3d17 100644 --- a/scapy/packet.py +++ b/scapy/packet.py @@ -959,12 +959,12 @@ A side effect is that, to obtain "{" and "}" characters, you must use c += "/"+pc return c -class NoPayload(Packet,object): +class NoPayload(Packet): def __new__(cls, *args, **kargs): singl = cls.__dict__.get("__singl__") if singl is None: - cls.__singl__ = singl = object.__new__(cls) - Packet.__init__(singl, *args, **kargs) + cls.__singl__ = singl = Packet.__new__(cls) + Packet.__init__(singl) return singl def __init__(self, *args, **kargs): pass -- GitLab