Skip to content

Commit 39076e4

Browse files
webdb: cleanup (#1814)
Signed-off-by: David Korczynski <[email protected]>
1 parent b8cf407 commit 39076e4

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

tools/web-fuzzing-introspection/app/static/assets/db/web_db_creator_from_summary.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,21 +1330,19 @@ def create_local_db(oss_fuzz_path):
13301330

13311331
# Accummulate the data from all the projects.
13321332
all_header_files = []
1333-
for project_key in analyses_dictionary:
1333+
for project_dict in analyses_dictionary.values():
13341334
# Append project timestamp to the list of timestamps
1335-
project_timestamp = analyses_dictionary[project_key][
1336-
'project_timestamp']
1335+
project_timestamp = project_dict['project_timestamp']
13371336
project_timestamps.append(project_timestamp)
13381337
db_timestamp['fuzzer_count'] += project_timestamp['fuzzer-count']
13391338

13401339
# Extend all header files
1341-
all_header_files.append(
1342-
analyses_dictionary[project_key]['all-header-files'])
1340+
all_header_files.append(project_dict['all-header-files'])
13431341

13441342
# Accummulate all function list and branch blockers
13451343
introspector_dictionary = project_timestamp.get(
13461344
'introspector-data', None)
1347-
if introspector_dictionary != None:
1345+
if introspector_dictionary is not None:
13481346
proj = introspector_dictionary['project_name']
13491347
# Functions
13501348
if proj in function_dict:
@@ -1373,9 +1371,8 @@ def create_local_db(oss_fuzz_path):
13731371
'function_coverage_estimate'] += introspector_dictionary[
13741372
'functions_covered_estimate']
13751373

1376-
coverage_dictionary = analyses_dictionary[project_key].get(
1377-
'coverage-data-dict', None)
1378-
if coverage_dictionary != None:
1374+
coverage_dictionary = project_dict.get('coverage-data-dict', None)
1375+
if coverage_dictionary is not None:
13791376
# Accummulate various stats for the DB timestamp.
13801377
db_timestamp["accummulated_lines_total"] += coverage_dictionary[
13811378
'line_coverage']['count']

0 commit comments

Comments
 (0)