# HG changeset patch # User Dennis Fink # Date 2015-10-22 17:25:48 # Node ID 0e2b4d4a1c8481d7ccb3cc15183cac240a1b6620 # Parent dd4694e8752c84f9bfbb0f94d7cbb8600f1189be # Parent a22dfc35a3e10d7adefb2358a1e6517b307de959 Merge hotfix-relay-weights diff --git a/ennstatus/api/model.py b/ennstatus/api/model.py --- a/ennstatus/api/model.py +++ b/ennstatus/api/model.py @@ -36,7 +36,11 @@ def calculate_weight(data): for subkey in ('1_week', '1_month', '3_months', '1_year', '5_years'): - subdata = data[subkey] + try: + subdata = data[subkey] + except KeyError: + continue + factor = subdata['factor'] values = [x * factor for x in subdata['values'] if x is not None] diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ def _get_requirements(): setup(name='Ennstatus', - version='5.0.2', + version='5.0.3', description=('Ennstatus provides the user with vital information about ' 'the status of the organizations Tor servers.'), author='Frënn vun der Ënn',