/[packages]/updates/1/transifex/current/SOURCES/python-magic.diff
ViewVC logotype

Diff of /updates/1/transifex/current/SOURCES/python-magic.diff

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 214155 by schedbot, Wed Jun 1 19:01:05 2011 UTC revision 214156 by misc, Fri Feb 24 20:48:02 2012 UTC
# Line 12  Index: ./transifex/storage/models.py Line 12  Index: ./transifex/storage/models.py
12  +                m = magic.Magic(mime=True)  +                m = magic.Magic(mime=True)
13  +                # guess mimetype and remove charset  +                # guess mimetype and remove charset
14  +                self.mime_type = m.from_file(self.get_storage_path())  +                self.mime_type = m.from_file(self.get_storage_path())
15  +        except AttributeError:  +        except (TypeError, AttributeError):
16  +                m = magic.open(magic.MAGIC_NONE)  +                m = magic.open(magic.MAGIC_NONE)
17  +                m.load()  +                m.load()
18  +                self.mime_type = m.file(self.get_storage_path())  +                self.mime_type = m.file(self.get_storage_path())

Legend:
Removed from v.214155  
changed lines
  Added in v.214156

  ViewVC Help
Powered by ViewVC 1.1.28