[IMP] document :- Bug #539644 - backward compatibility for file utility

bzr revid: ysa@tinyerp.co.in-20100319112222-7k4hv6xbfjh06dnv
This commit is contained in:
Paul J Stevens
2010-03-19 16:52:22 +05:30
committed by Ysa (Open ERP)
parent 0f6344b448
commit 71fa375ac0
+2 -3
View File
@@ -158,11 +158,10 @@ class contentIndex():
os.write(fd, content)
os.close(fd)
#fp = Popen(['file','-b','--mime-type',fname], shell=False, stdout=PIPE).stdout
fp = Popen(['file','-b',fname], shell=False, stdout=PIPE).stdout
fp = Popen(['file','-b','--mime',fname], shell=False, stdout=PIPE).stdout
result = fp.read()
fp.close()
mime2 = result.strip()
mime2 = result.split(';')[0]
self.__logger.debug('File gave us: %s', mime2)
# Note that the temporary file still exists now.
mime,fobj = mime_match(mime2, self.mimes)