1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 19:10:11 +01:00

checkupdates: use html.unescape instead of HTMLParser.unescape

HTMLParser.unescape is only an internal method and deprecated.
This requires Pyhton 3.4.
This commit is contained in:
Marcus Hoffmann 2017-09-13 01:42:15 +02:00
parent 921524081c
commit 5ebde251b1

View File

@ -25,7 +25,7 @@ import time
import subprocess import subprocess
from argparse import ArgumentParser from argparse import ArgumentParser
import traceback import traceback
from html.parser import HTMLParser import html
from distutils.version import LooseVersion from distutils.version import LooseVersion
import logging import logging
import copy import copy
@ -289,8 +289,7 @@ def check_gplay(app):
m = re.search('itemprop="softwareVersion">[ ]*([^<]+)[ ]*</div>', page) m = re.search('itemprop="softwareVersion">[ ]*([^<]+)[ ]*</div>', page)
if m: if m:
html_parser = HTMLParser() version = html.unescape(m.group(1))
version = html_parser.unescape(m.group(1))
if version == 'Varies with device': if version == 'Varies with device':
return (None, 'Device-variable version, cannot use this method') return (None, 'Device-variable version, cannot use this method')