Changeset - 041a255ca6ce
[Not reviewed]
Merge dev
0 2 0
Dennis Fink - 9 years ago 2015-10-22 17:27:03
dennis.fink@c3l.lu
Merge hotfix-relay-weights
2 files changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
ennstatus/api/model.py
Show inline comments
 
@@ -33,13 +33,17 @@ validate = functools.partial(
 
def calculate_weight(data):
 

	
 
    obj = {}
 

	
 
    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]
 

	
 
        if values:
 
            obj[subkey] = statistics.mean(values) * 100
setup.py
Show inline comments
 
@@ -8,13 +8,13 @@ def _get_requirements():
 

	
 
    lines = [line[:-1] for line in lines if not line.startswith('#')]
 
    return lines
 

	
 

	
 
setup(name='Ennstatus',
 
      version='5.0.2-dev',
 
      version='5.0.3-dev',
 
      description=('Ennstatus provides the user with vital information about '
 
                   'the status of the organizations Tor servers.'),
 
      author='Frënn vun der Ënn',
 
      author_email='info@enn.lu',
 
      url='https://bitbucket.org/fvde/ennstatus',
 
      license='GPLv3+',
0 comments (0 inline, 0 general)