diff options
| author | Andre Cruz <andre.cruz@co.sapo.pt> | 2012-07-25 10:27:25 +0100 |
|---|---|---|
| committer | Andre Cruz <andre.cruz@co.sapo.pt> | 2012-07-25 10:27:25 +0100 |
| commit | 4b88db6041301221eafc306f88a535ba62a53356 (patch) | |
| tree | f6aa7d71ebd2209bdabd0a107322f0c1b3a19650 | |
| parent | 6c23fa27c62c1b3dc0da842fb5e06c7d7aecbfe2 (diff) | |
| download | python-magic-4b88db6041301221eafc306f88a535ba62a53356.tar.gz | |
Check for magic_close as well. When python is exiting it can be
None already.
| -rw-r--r-- | magic.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -69,7 +69,7 @@ class Magic: return magic_file(self.cookie, filename) def __del__(self): - if self.cookie: + if self.cookie and magic_close: magic_close(self.cookie) self.cookie = None |
