[csw-devel] SF.net SVN: gar:[13737] csw/mgar/gar/v2/lib/python/inspective_package.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Fri Mar 11 13:50:09 CET 2011
Revision: 13737
http://gar.svn.sourceforge.net/gar/?rev=13737&view=rev
Author: wahwah
Date: 2011-03-11 12:50:09 +0000 (Fri, 11 Mar 2011)
Log Message:
-----------
checkpkg: Support libmagic-5.05 Python bindings
Names of constants in libmagic Python bindings have changed.
http://mx.gw.com/pipermail/file/2011/000693.html
Signed-off-by: Maciej Blizinski <maciej at opencsw.org>
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/inspective_package.py
Modified: csw/mgar/gar/v2/lib/python/inspective_package.py
===================================================================
--- csw/mgar/gar/v2/lib/python/inspective_package.py 2011-03-11 09:28:25 UTC (rev 13736)
+++ csw/mgar/gar/v2/lib/python/inspective_package.py 2011-03-11 12:50:09 UTC (rev 13737)
@@ -299,7 +299,11 @@
magic_cookie = magic.open(self.cookie_count)
self.cookie_count += 1
magic_cookie.load()
- magic_cookie.setflags(magic.MAGIC_MIME)
+ if "MAGIC_MIME" in dir(magic):
+ flag = magic.MAGIC_MIME
+ elif "MIME" in dir(magic):
+ flag = magic.MIME
+ magic_cookie.setflags(flag)
return magic_cookie
def _LazyInit(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list