From 7569201b1d3ed0840b4c20c09eaa71c6d08bbe11 Mon Sep 17 00:00:00 2001 From: str4d Date: Wed, 16 Jan 2013 02:05:27 +0000 Subject: [PATCH] Don't try and split a list metatag if it doesn't exist --- i2p2www/blog/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i2p2www/blog/helpers.py b/i2p2www/blog/helpers.py index d4c12884..7a6a8a39 100644 --- a/i2p2www/blog/helpers.py +++ b/i2p2www/blog/helpers.py @@ -109,6 +109,6 @@ def get_metadata_from_meta(meta): for metaTag in SUPPORTED_METATAGS: metaLine = [s for s in metaLines if 'name="%s"' % metaTag in s] ret[metaTag] = metaLine[0].split('content="')[1].split('"')[0] if len(metaLine) > 0 else SUPPORTED_METATAGS[metaTag] - if metaTag in LIST_METATAGS: + if metaTag in LIST_METATAGS and ret[metaTag]: ret[metaTag] = [s.strip() for s in ret[metaTag].split(',')] return ret