Browse Source

update

pull/6/head
Mathias Markl 6 years ago
parent
commit
2b276af8c0
  1. 2
      muk_utils/__manifest__.py
  2. 2
      muk_utils/tools/utils_os.py

2
muk_utils/__manifest__.py

@ -20,7 +20,7 @@
{
"name": "MuK Utils",
"summary": """Utility Features""",
"version": '11.0.1.0.10',
"version": '11.0.1.0.11',
"category": 'Extra Tools',
"license": "AGPL-3",
"website": "https://www.mukit.at",

2
muk_utils/tools/utils_os.py

@ -50,7 +50,7 @@ def get_extension(filename, mimetype):
mimetype = guess_mimetype(binary, default=False)
if not mimetype and filename:
mimetype = mimetypes.guess_type(urllib.request.pathname2url(filename))[0]
if not filename and mimetype:
if mimetype and mimetype != 'application/octet-stream':
return mimetypes.guess_extension(mimetype)[1:].strip().lower()
elif filename:
return os.path.splitext(filename)[1][1:].strip().lower()
Loading…
Cancel
Save