mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 02:50:12 +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:
parent
7f7c93e801
commit
8cf4503a00
@ -332,7 +332,7 @@ class ScannerTool:
|
|||||||
self.scanner_data_lookup()
|
self.scanner_data_lookup()
|
||||||
|
|
||||||
options = common.get_options()
|
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'):
|
if options_refresh_scanner or common.get_config().get('refresh_scanner'):
|
||||||
self.refresh()
|
self.refresh()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user