Skip to content

Commit

Permalink
Code cleanup on #845.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjordan committed Nov 26, 2024
1 parent 0dcd0f1 commit d1b6ea4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion WorkbenchConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def get_default_config(self):
"allow_csv_value_templates_if_field_empty": [],
"remind_user_to_run_check": False,
"media_type_by_media_use": False,
"paged_content_ignore_files": ["Thumbs.db"]
"paged_content_ignore_files": ["Thumbs.db"],
}

# Tests validity and existence of configuration file path.
Expand Down
8 changes: 6 additions & 2 deletions workbench_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3649,7 +3649,9 @@ def check_input(config, args):
print("Warning: " + message)
logging.warning(message)
for page_file_name in page_files:
if page_file_name.strip().lower() not in [fn.strip().lower() for fn in config["paged_content_ignore_files"]]:
if page_file_name.strip().lower() not in [
fn.strip().lower() for fn in config["paged_content_ignore_files"]
]:
if config["paged_content_sequence_separator"] not in page_file_name:
message = (
"Page file "
Expand Down Expand Up @@ -8630,7 +8632,9 @@ def create_children_from_directory(config, parent_csv_record, parent_node_id):
required_fields = get_required_bundle_fields(config, "node", config["content_type"])

for page_file_name in page_files:
if page_file_name.strip().lower() in [fn.strip().lower() for fn in config["paged_content_ignore_files"]]:
if page_file_name.strip().lower() in [
fn.strip().lower() for fn in config["paged_content_ignore_files"]
]:
continue

filename_without_extension = os.path.splitext(page_file_name)[0]
Expand Down

0 comments on commit d1b6ea4

Please sign in to comment.