--- mirrorselect/main.py 2017-02-20 19:22:07.000000000 +0000 +++ mirrorselect/main.p 2017-02-20 19:21:40.332951323 +0000 @@ -107,9 +107,10 @@ var = 'SYNC' else: var = 'GENTOO_MIRRORS' - - if hasattr(hosts[0], 'decode'): - hosts = [x.decode('utf-8') for x in hosts] + + for i in range(0, len(hosts)): + if hasattr(hosts[i], 'decode'): + hosts[i] = hosts[i].decode('utf-8') if var == "sync-uri" and out: mirror_string = '%s = %s' % (var, ' '.join(hosts))