Accidently used Python3 code

Used urllib.request.urlopen by mistake instead of just urllib.urlopen as I
cherry picked the commit from the python3 branch without realising it
contained python3 specific parts.