mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
Fix androguard import for versions <4
This commit is contained in:
parent
385832c1fd
commit
96f9d7fdf8
1 changed files with 4 additions and 4 deletions
|
@ -11,12 +11,12 @@ from datetime import datetime, timezone
|
||||||
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
|
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import loguru
|
|
||||||
from androguard.core.apk import get_apkid
|
|
||||||
from ruamel.yaml import YAML
|
from ruamel.yaml import YAML
|
||||||
|
|
||||||
# suppress unnecessary logging output from get_apkid
|
try:
|
||||||
loguru.logger.disable("androguard")
|
from androguard.core.bytecodes.apk import get_apkid # androguard <4
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
from androguard.core.apk import get_apkid
|
||||||
|
|
||||||
|
|
||||||
basedir = Path(__file__).parent
|
basedir = Path(__file__).parent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue