mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03: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:
parent
921524081c
commit
5ebde251b1
1 changed files with 2 additions and 3 deletions
|
@ -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')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue