1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-03 17:50:11 +02:00

merge scan_apk doc string updates

This commit is contained in:
Hans-Christoph Steiner 2021-06-25 09:28:41 +02:00
parent 578ff7069f
commit 3e7ce8ce31
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA

View File

@ -1368,16 +1368,25 @@ def scan_repo_files(apkcache, repodir, knownapks, use_date_from_file=False):
def scan_apk(apk_file, require_signature=True):
"""
Scans an APK file and returns dictionary with metadata of the APK.
"""Scan an APK file and returns dictionary with metadata of the APK.
Attention: This does *not* verify that the APK signature is correct.
:param apk_file: The (ideally absolute) path to the APK file
:param require_signature: Raise an exception is there is no valid
signature. Default to Ture.
:raises BuildException
:return A dict containing APK metadata
Parameters
----------
apk_file
The (ideally absolute) path to the APK file
require_signature
Raise an exception is there is no valid signature. Default to True.
Raises
------
BuildException
Returns
-------
A dict containing APK metadata
"""
apk = {
'hash': common.sha256sum(apk_file),