From 7b2f7077bcbf83397ed9684f011d1087ce45b92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Fri, 26 Jun 2015 17:58:57 +0200 Subject: [PATCH] Hotfix for 7b68b90569 - don't cal .split() on None --- fdroidserver/update.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index f44f3549..b54eb1ef 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -832,17 +832,19 @@ def make_index(apps, sortedids, apks, repodir, archive, categories): addElement('marketversion', app['Current Version'], doc, apel) addElement('marketvercode', app['Current Version Code'], doc, apel) - af = app['AntiFeatures'].split(',') - # TODO: Temporarily not including UpstreamNonFree in the index, - # because current F-Droid clients do not understand it, and also - # look ugly when they encounter an unknown antifeature. This - # filtering can be removed in time... - if 'UpstreamNonFree' in af: - af.remove('UpstreamNonFree') - if af: - addElement('antifeatures', ','.join(af), doc, apel) - pv = app['Provides'].split(',') - addElement('provides', ','.join(pv), doc, apel) + if app['AntiFeatures']: + af = app['AntiFeatures'].split(',') + # TODO: Temporarily not including UpstreamNonFree in the index, + # because current F-Droid clients do not understand it, and also + # look ugly when they encounter an unknown antifeature. This + # filtering can be removed in time... + if 'UpstreamNonFree' in af: + af.remove('UpstreamNonFree') + if af: + addElement('antifeatures', ','.join(af), doc, apel) + if app['Provides']: + pv = app['Provides'].split(',') + addElement('provides', ','.join(pv), doc, apel) if app['Requires Root']: addElement('requirements', 'root', doc, apel)