From dd957fe0f261db6481882fee0413f459425000c2 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Tue, 6 Oct 2015 20:05:22 -0700 Subject: bitbake: toaster: Rationalise mimetype guessing to fix artifact downloads Artifact download links were broken because the function to get the mimetype for the artifact was incorrectly using the underlying mimetype library. The function was also attached to the build environment controller, which was unnecessary, as we only support local controllers anyway. Remove the mimetype getter on the build environment and use the one in the view code instead. This works correctly and prevents the download error from occurring. [YOCTO #8369] (Bitbake rev: 805fb2a9388c728600596e9b845a5c7eeaebd99c) Signed-off-by: Elliot Smith Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/toaster/toastergui/views.py') diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 6e5815595f..839ee78f97 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py @@ -2981,7 +2981,7 @@ if True: if file_name is None: raise Exception("Could not handle artifact %s id %s" % (artifact_type, artifact_id)) else: - content_type = b.buildrequest.environment.get_artifact_type(file_name) + content_type = MimeTypeFinder.get_mimetype(file_name) fsock = b.buildrequest.environment.get_artifact(file_name) file_name = os.path.basename(file_name) # we assume that the build environment system has the same path conventions as host -- cgit v1.2.3-54-g00ecf