From 5eff1ab9bf0c3820c8b90e18efee1dfc773d08fc Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 23 Dec 2013 11:51:04 -0600 Subject: Set all attributes to default values on status URL fetch We were missing two duration-related attributes here, causing some 500 errors to happen if we had cached status_data around that didn't agree with our current list of checked mirrors. Don't blow up on the JSON data fetch by ensuring we provide a value, even if it is out of date. Signed-off-by: Dan McGee --- mirrors/utils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mirrors/utils.py') diff --git a/mirrors/utils.py b/mirrors/utils.py index 0dd26ae0..be44121a 100644 --- a/mirrors/utils.py +++ b/mirrors/utils.py @@ -88,6 +88,8 @@ def annotate_url(url, url_data): ('success_count', 0), ('check_count', 0), ('completion_pct', None), + ('duration_avg', None), + ('duration_stddev', None), ('last_check', None), ('last_sync', None), ('delay', None), -- cgit v1.2.3-2-g168b From 16b22e4bfc2e271a58a79a9fb4ccb5e059c6d62a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 22 Feb 2014 08:49:58 -0600 Subject: Upgrade django-countries to 2.0 Signed-off-by: Dan McGee --- mirrors/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mirrors/utils.py') diff --git a/mirrors/utils.py b/mirrors/utils.py index be44121a..fe18cd6a 100644 --- a/mirrors/utils.py +++ b/mirrors/utils.py @@ -179,7 +179,7 @@ def get_mirror_errors(cutoff=DEFAULT_CUTOFF, mirror_id=None, show_all=False): errors = list(errors) for err in errors: - err['country'] = Country(err['url__country']) + err['country'] = Country(err['url__country'], flag_url='') return errors -- cgit v1.2.3-2-g168b