mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
scanner: safely check options, for things using this API
https://gitlab.com/fdroid/fdroidserver/-/issues/771#note_353495799
This commit is contained in:
parent
75acf63efa
commit
ee54dbce87
3 changed files with 3 additions and 4 deletions
|
|
@ -172,9 +172,9 @@ def scan_source(build_dir, build=metadata.Build()):
|
|||
return ignoreproblem(what, path_in_build_dir)
|
||||
if todelete(path_in_build_dir):
|
||||
return removeproblem(what, path_in_build_dir, filepath)
|
||||
if options.json:
|
||||
if options and options.json:
|
||||
json_per_build['errors'].append([what, path_in_build_dir])
|
||||
if not options.json or options.verbose:
|
||||
if options and (options.verbose or not options.json):
|
||||
logging.error('Found %s at %s' % (what, path_in_build_dir))
|
||||
return 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue