From c612b1931415ca5e6a7265b4e06cd045e851e07e Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Fri, 16 Feb 2018 22:08:35 +0100 Subject: main: run 2to3 --- mirrors/views/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mirrors') diff --git a/mirrors/views/api.py b/mirrors/views/api.py index 857b1d1d..268bf330 100644 --- a/mirrors/views/api.py +++ b/mirrors/views/api.py @@ -24,7 +24,7 @@ class MirrorStatusJSONEncoder(DjangoJSONEncoder): if isinstance(obj, MirrorUrl): data = {attr: getattr(obj, attr) for attr in self.url_attributes} country = obj.country - data['country'] = unicode(country.name) + data['country'] = str(country.name) data['country_code'] = country.code data['isos'] = obj.mirror.isos data['ipv4'] = obj.has_ipv4 @@ -32,7 +32,7 @@ class MirrorStatusJSONEncoder(DjangoJSONEncoder): data['details'] = obj.get_full_url() return data if isinstance(obj, MirrorProtocol): - return unicode(obj) + return str(obj) return super(MirrorStatusJSONEncoder, self).default(obj) @@ -64,7 +64,7 @@ class LocationJSONEncoder(DjangoJSONEncoder): 'id': obj.pk, 'hostname': obj.hostname, 'source_ip': obj.source_ip, - 'country': unicode(obj.country.name), + 'country': str(obj.country.name), 'country_code': obj.country.code, 'ip_version': obj.ip_version, } -- cgit v1.2.3-55-g3dc8