Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: packagerEdge.py

Issue 29360043: Issue 4575 - Fix failing tests in buildtools (Closed)
Patch Set: Address comments on patch set 1 Created Nov. 30, 2016, 3:10 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | releaseAutomation.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packagerEdge.py
===================================================================
--- a/packagerEdge.py
+++ b/packagerEdge.py
@@ -112,20 +112,22 @@
def create_content_types_map(filenames):
"""Create [Content_Types].xml -- a mime type map."""
params = {'defaults': {}, 'overrides': {}}
overrides = {
BLOCKMAP: 'application/vnd.ms-appx.blockmap+xml',
MANIFEST: 'application/vnd.ms-appx.manifest+xml'
}
+ types = mimetypes.MimeTypes()
+ types.add_type('application/octet-stream', '.otf')
for filename in filenames:
ext = os.path.splitext(filename)[1]
if ext:
- content_type = mimetypes.guess_type(filename, strict=False)[0]
+ content_type = types.guess_type(filename, strict=False)[0]
if content_type is not None:
params['defaults'][ext[1:]] = content_type
if filename in overrides:
params['overrides']['/' + filename] = overrides[filename]
content_types_template = _get_template_for(CONTENT_TYPES)
return content_types_template.render(params).encode('utf-8')
« no previous file with comments | « no previous file | releaseAutomation.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld