diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2018-02-16 22:08:35 +0100 |
---|---|---|
committer | Jelle van der Waa <jelle@vdwaa.nl> | 2019-01-21 21:19:58 +0100 |
commit | c612b1931415ca5e6a7265b4e06cd045e851e07e (patch) | |
tree | 89527c2290c58721042a063d26b59cd135a1b12f /mirrors | |
parent | 7742430a261f36a834b93d2b8242cf847d25caa3 (diff) | |
download | archweb-c612b1931415ca5e6a7265b4e06cd045e851e07e.tar.gz archweb-c612b1931415ca5e6a7265b4e06cd045e851e07e.zip |
main: run 2to3
Diffstat (limited to 'mirrors')
-rw-r--r-- | mirrors/views/api.py | 6 |
1 files changed, 3 insertions, 3 deletions
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, } |