Python 2.7 is likely the only Python 2 anyone is using any longer
(even that's well past EOL upstream now), and reasonably recent
versions of 2.7 it need the same decode hack as Python 3 anyway when
dealing with some retrieved content. Just get rid of the version
detection and do it under any version.
dcache_fd.close()
else:
try:
- if pyversion("3"): data = urlopen(uri).read().decode("utf-8")
- else: data = urlopen(uri).read()
+ data = urlopen(uri).read().decode("utf-8")
except URLError:
if ignore_fail: return ""
else: