chiark / gitweb /
import: switch to python3 urllib
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 4 Jan 2016 20:35:17 +0000 (21:35 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Fri, 11 Mar 2016 13:27:00 +0000 (13:27 +0000)
fdroidserver/import.py

index 995ed49e13f789232dd1b74ef382e8c560e567f8..3b80e485cca797c81fd281bcfe4b25caca8abdcf 100644 (file)
@@ -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()