From ac16f1b60f3510f0b835802e9520da6407c1ca13 Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Sat, 1 Sep 2012 17:13:32 +0200 Subject: [PATCH] fix url_info(): allow unknown MIME type --- you_get/common.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/you_get/common.py b/you_get/common.py index 85aca54f..bc1a60fc 100644 --- a/you_get/common.py +++ b/you_get/common.py @@ -106,8 +106,11 @@ def url_info(url): 'video/webm': 'webm', 'video/x-flv': 'flv' } - assert type in mapping, type - ext = mapping[type] + #assert type in mapping, type + if type in mapping: + ext = mapping[type] + else: + ext = None size = int(headers['content-length'])