From 7d4176dd501edaee974ccc9d75826ab6cf7c6bff Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 23 Mar 2017 23:13:37 +0100 Subject: [PATCH] metadata: don't crash if metadata includes blank Categories list If someone includes just 'Categories:', it shouldn't crash. --- fdroidserver/metadata.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index da4730cb..1d978dcc 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -815,6 +815,8 @@ def post_metadata_parse(app): if isinstance(app.Categories, str): app.Categories = [app.Categories] + elif app.Categories is None: + app.Categories = ['None'] else: app.Categories = [str(i) for i in app.Categories]