Skip library before erroring for multiple types.

This commit is contained in:
Luigi311
2023-01-27 10:43:50 -07:00
parent 7f9424260a
commit f08ec43507
2 changed files with 22 additions and 12 deletions

View File

@@ -168,8 +168,13 @@ def check_skip_logic(
):
skip_reason = None
if library_type.lower() in blacklist_library_type:
skip_reason = "is blacklist_library_type"
if type(library_type) in [list, tuple, set]:
for library_type_item in library_type:
if library_type_item.lower() in blacklist_library_type:
skip_reason = "is blacklist_library_type"
else:
if library_type.lower() in blacklist_library_type:
skip_reason = "is blacklist_library_type"
if library_title.lower() in [x.lower() for x in blacklist_library]:
skip_reason = "is blacklist_library"
@@ -182,8 +187,13 @@ def check_skip_logic(
skip_reason = "is blacklist_library"
if len(whitelist_library_type) > 0:
if library_type.lower() not in whitelist_library_type:
skip_reason = "is not whitelist_library_type"
if type(library_type) in [list, tuple, set]:
for library_type_item in library_type:
if library_type_item.lower() not in whitelist_library_type:
skip_reason = "is not whitelist_library_type"
else:
if library_type.lower() not in whitelist_library_type:
skip_reason = "is not whitelist_library_type"
# if whitelist is not empty and library is not in whitelist
if len(whitelist_library) > 0: