Fix zuul_swift_upload to use old MAGIC_MIME const

The magic bindings updated to not prefix their constants with
MAGIC. Centos has an old version so we need to use the old constant
names (which are backwards compatible).

I've tested this on centos6 and ubuntu 12.04

Change-Id: Ic64c7395323e7583b37cf624d062cc3f40c89893
This commit is contained in:
Joshua Hesketh 2014-10-01 12:42:21 +10:00
parent c3c6cd765d
commit 36180f415a

View File

@ -73,7 +73,7 @@ def get_file_mime(file_path):
return magic.from_file(file_path, mime=True)
else:
# no magic.from_file, we might be using the libmagic bindings
m = magic.open(magic.MIME)
m = magic.open(magic.MAGIC_MIME)
m.load()
return m.file(file_path).split(';')[0]