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') |