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

🐜 scanner: fix ScannerTool init crash

When scanner.py::ScannerTool is instatiated but the calling code was
started by a call to e.g. `build.py` ScannerTool will crash. This change
makes it so that ScannerTool will intializes with a default value
instead of crashing when triging to access a non existen cli argument.

also see https://gitlab.com/fdroid/fdroidserver/-/issues/1212
This commit is contained in:
Michael Pöhn 2024-05-15 16:52:52 +02:00 committed by Jochen Sprickerhof
parent 7f7c93e801
commit 8cf4503a00

View File

@ -332,7 +332,7 @@ class ScannerTool:
self.scanner_data_lookup()
options = common.get_options()
options_refresh_scanner = options and options.refresh_scanner
options_refresh_scanner = hasattr(options, "refresh_scanner") and options.refresh_scanner
if options_refresh_scanner or common.get_config().get('refresh_scanner'):
self.refresh()