mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +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 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…
Add table
Add a link
Reference in a new issue