From: Daniel Martí Date: Sat, 16 Aug 2014 09:42:51 +0000 (+0200) Subject: stats: simpler repo type logic X-Git-Tag: 0.3.0~89 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=eb8137563055783b0b667c5f15c4182112cc6d90;p=fdroidserver.git stats: simpler repo type logic --- diff --git a/fdroidserver/stats.py b/fdroidserver/stats.py index 255d2304..e6ca4d03 100644 --- a/fdroidserver/stats.py +++ b/fdroidserver/stats.py @@ -214,13 +214,9 @@ def main(): logging.info("Processing repo types...") repotypes = Counter() for app in metaapps: - if len(app['Repo Type']) == 0: - rtype = 'none' - else: - if app['Repo Type'] == 'srclib': - rtype = common.getsrclibvcs(app['Repo']) - else: - rtype = app['Repo Type'] + rtype = app['Repo Type'] or 'none' + if rtype == 'srclib': + rtype = common.getsrclibvcs(app['Repo']) repotypes[rtype] += 1 f = open('stats/repotypes.txt', 'w') for rtype in repotypes: