mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
import: switch to python3 urllib
This commit is contained in:
parent
a51d849a5b
commit
031bb39961
@ -20,7 +20,7 @@
|
||||
import sys
|
||||
import os
|
||||
import shutil
|
||||
import urllib
|
||||
import urllib.request
|
||||
from argparse import ArgumentParser
|
||||
from configparser import ConfigParser
|
||||
import logging
|
||||
@ -35,7 +35,7 @@ from . import metadata
|
||||
# Returns repotype, address, or None, reason
|
||||
def getrepofrompage(url):
|
||||
|
||||
req = urllib.urlopen(url)
|
||||
req = urllib.request.urlopen(url)
|
||||
if req.getcode() != 200:
|
||||
return (None, 'Unable to get ' + url + ' - return code ' + str(req.getcode()))
|
||||
page = req.read()
|
||||
|
Loading…
Reference in New Issue
Block a user