mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-07 16:00:28 +03:00
import: switch to python3 urllib
This commit is contained in:
parent
a51d849a5b
commit
031bb39961
1 changed files with 2 additions and 2 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import urllib
|
import urllib.request
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -35,7 +35,7 @@ from . import metadata
|
||||||
# Returns repotype, address, or None, reason
|
# Returns repotype, address, or None, reason
|
||||||
def getrepofrompage(url):
|
def getrepofrompage(url):
|
||||||
|
|
||||||
req = urllib.urlopen(url)
|
req = urllib.request.urlopen(url)
|
||||||
if req.getcode() != 200:
|
if req.getcode() != 200:
|
||||||
return (None, 'Unable to get ' + url + ' - return code ' + str(req.getcode()))
|
return (None, 'Unable to get ' + url + ' - return code ' + str(req.getcode()))
|
||||||
page = req.read()
|
page = req.read()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue