[csw-devel] SF.net SVN: gar:[14047] csw/mgar/gar/v2/lib/python/inspective_package_test. py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sat Apr 2 13:23:44 CEST 2011
Revision: 14047
http://gar.svn.sourceforge.net/gar/?rev=14047&view=rev
Author: wahwah
Date: 2011-04-02 11:23:44 +0000 (Sat, 02 Apr 2011)
Log Message:
-----------
inspective_package_test.py: Backward compatilibity
To support libmagic 5.04 and 5.05.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/inspective_package_test.py
Modified: csw/mgar/gar/v2/lib/python/inspective_package_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/inspective_package_test.py 2011-04-02 00:42:48 UTC (rev 14046)
+++ csw/mgar/gar/v2/lib/python/inspective_package_test.py 2011-04-02 11:23:44 UTC (rev 14047)
@@ -37,7 +37,11 @@
self.mox.StubOutWithMock(magic, 'open')
magic.open(0).AndReturn(magic_cookie_mock)
magic_cookie_mock.load()
- magic_cookie_mock.setflags(magic.MIME)
+ if "MAGIC_MIME" in dir(magic):
+ flag = magic.MAGIC_MIME
+ elif "MIME" in dir(magic):
+ flag = magic.MIME
+ magic_cookie_mock.setflags(flag)
magic_cookie_mock.file(
u'/fake/path/CSWfoo/root/foo-file').AndReturn(
"application/x-executable")
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