mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
checkupdates: fix google play check method
This has never worked with python3 and was also not properly adapted to apps as objects. So we fix both of these issues.
This commit is contained in:
parent
253bd92df3
commit
921524081c
1 changed files with 2 additions and 2 deletions
|
|
@ -279,7 +279,7 @@ def check_gplay(app):
|
||||||
req = urllib.request.Request(url, None, headers)
|
req = urllib.request.Request(url, None, headers)
|
||||||
try:
|
try:
|
||||||
resp = urllib.request.urlopen(req, None, 20)
|
resp = urllib.request.urlopen(req, None, 20)
|
||||||
page = resp.read()
|
page = resp.read().decode()
|
||||||
except urllib.error.HTTPError as e:
|
except urllib.error.HTTPError as e:
|
||||||
return (None, str(e.code))
|
return (None, str(e.code))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
@ -531,7 +531,7 @@ def main():
|
||||||
apps = common.read_app_args(options.appid, allapps, False)
|
apps = common.read_app_args(options.appid, allapps, False)
|
||||||
|
|
||||||
if options.gplay:
|
if options.gplay:
|
||||||
for app in apps:
|
for appid, app in apps.items():
|
||||||
version, reason = check_gplay(app)
|
version, reason = check_gplay(app)
|
||||||
if version is None:
|
if version is None:
|
||||||
if reason == '404':
|
if reason == '404':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue