mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
fix _dexdump_found() in test_scanner.py !1621
find_sdk_tools_cmd() will throw an exception if it can't find the tool, not return None.
This commit is contained in:
parent
0b192a7694
commit
58609aa9f0
1 changed files with 8 additions and 3 deletions
|
@ -23,6 +23,7 @@ import yaml
|
|||
|
||||
import fdroidserver.build
|
||||
import fdroidserver.common
|
||||
import fdroidserver.exception
|
||||
import fdroidserver.metadata
|
||||
import fdroidserver.scanner
|
||||
from .shared_test_code import TmpCwd, mkdtemp, mock_open_to_str
|
||||
|
@ -36,9 +37,13 @@ def _dexdump_found():
|
|||
This must be run after common.config is setup.
|
||||
|
||||
"""
|
||||
dexdump = fdroidserver.common.find_sdk_tools_cmd("dexdump")
|
||||
logging.debug('Found dexdump: %s', dexdump)
|
||||
return dexdump is not None
|
||||
try:
|
||||
dexdump = fdroidserver.common.find_sdk_tools_cmd("dexdump")
|
||||
logging.debug('Found dexdump: %s', dexdump)
|
||||
return dexdump is not None
|
||||
except fdroidserver.exception.FDroidException:
|
||||
pass
|
||||
return False
|
||||
|
||||
|
||||
# Always use built-in default rules so changes in downloaded rules don't break tests.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue