diff options
| author | Flavio Percoco Premoli <flaper87@gmail.com> | 2010-09-30 13:48:44 +0200 |
|---|---|---|
| committer | Flavio Percoco Premoli <flaper87@gmail.com> | 2010-09-30 13:48:44 +0200 |
| commit | 61fd4ee20345018283562045498feb1db048feed (patch) | |
| tree | cf20005b9cc149f54b495f6090a2a9b79f8eaa9f /magic.py | |
| parent | 6b1f949f88b19fe2a12684271785b7ef23dc0b7d (diff) | |
| download | python-magic-61fd4ee20345018283562045498feb1db048feed.tar.gz | |
Commet error fix. I was hungry
Diffstat (limited to 'magic.py')
| -rw-r--r-- | magic.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -66,9 +66,9 @@ class Magic: return magic_file(self.cookie, filename) def __del__(self): - if self.cookie: - magic_close(self.cookie) - self.cookie = None + if self.cookie: + magic_close(self.cookie) + self.cookie = None _magic_mime = None _magic = None @@ -116,14 +116,14 @@ if not libmagic or not libmagic._name: try: # try mac ports location libmagic = ctypes.CDLL('/opt/local/lib/libmagic.dylib') - # Show we catch just OSError exceptions? + # Should we catch just OSError exceptions? except: pass elif sys.platform == "win32": try: # try local magic1.dll libmagic = ctypes.CDLL('magic1.dll') - # Show we catch just OSError exceptions? + # Should we catch just OSError exceptions? except: pass |
