Check for cookie attribute before trying to delete it
__del__ is called regardless of whether __init__ passed, so the cookie attribute may not exits. This can be seen with: python3 -c "import magic; magic.Magic(foo=None)" Also discussed in https://github.com/ahupp/python-magic/pull/222#issuecomment-675354824
J
Jochen Sprickerhof committed
12d0ea062d92a15baee69c4be0e4ae00fcdee416
Parent: 0ab68b2