summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hupp <adam@hupp.org>2020-08-13 14:44:14 -0700
committerGitHub <noreply@github.com>2020-08-13 14:44:14 -0700
commita9ba472dc1e05385fc2cd9bb333c82caeefde36d (patch)
tree0c9aae9a87b5985c2b43533612551b517f79fa91
parent1a9f90ac5c6b6eb93495595e1af4407943f3e278 (diff)
parent16972c2c6fda3573860f5f8b0f2c03b757e71d3c (diff)
downloadpython-magic-a9ba472dc1e05385fc2cd9bb333c82caeefde36d.tar.gz
Merge pull request #222 from koreno/patch-1
Fix bug in Magic when destructor called too early
-rw-r--r--magic.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/magic.py b/magic.py
index 4828148..7a1b1bd 100644
--- a/magic.py
+++ b/magic.py
@@ -48,6 +48,8 @@ class Magic:
uncompress - Try to look inside compressed files.
raw - Do not try to decode "non-printable" chars.
"""
+
+ self.cookie = None
self.flags = MAGIC_NONE
if mime:
self.flags |= MAGIC_MIME_TYPE