summaryrefslogtreecommitdiff
path: root/mirrors
diff options
context:
space:
mode:
Diffstat (limited to 'mirrors')
-rw-r--r--mirrors/views.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/mirrors/views.py b/mirrors/views.py
index f03a2e8a..6135cee3 100644
--- a/mirrors/views.py
+++ b/mirrors/views.py
@@ -155,9 +155,8 @@ class MirrorStatusJSONEncoder(DjangoJSONEncoder):
# mainly for queryset serialization
return list(obj)
if isinstance(obj, MirrorUrl):
- data = {}
- for attr in self.url_attributes:
- data[attr] = getattr(obj, attr)
+ data = dict((attr, getattr(obj, attr))
+ for attr in self.url_attributes)
# separate because it isn't on the URL directly
data['country'] = obj.real_country
return data