From 479432f01a578933e28a789c006da6e3be0b4bb5 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 23 Aug 2016 17:44:30 +0200 Subject: [PATCH] upload_date can be none --- pandora/archive/external.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/archive/external.py b/pandora/archive/external.py index 3683b2ed..90aa3b06 100644 --- a/pandora/archive/external.py +++ b/pandora/archive/external.py @@ -55,9 +55,9 @@ def get_info(url): for k in info_keys if k in i and i[k] }) - if not 'tags' in info[-1]: + if 'tags' not in info[-1]: info[-1]['tags'] = [] - if 'upload_date' in i: + if 'upload_date' in i and i['upload_date']: info[-1]['date'] = '-'.join([i['upload_date'][:4], i['upload_date'][4:6], i['upload_date'][6:]]) return info