From dca64adba1ef02bc7e4af5a29d1c88611efe568e Mon Sep 17 00:00:00 2001 From: Lucian Smith Date: Tue, 4 Jun 2024 16:51:49 -0700 Subject: [PATCH] Rename moved from yml file. Don't need the try/except around the original rename; it's the first pass. --- fix_manual_corrections.yml | 3 --- rename_sbml_files.py | 7 ++----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/fix_manual_corrections.yml b/fix_manual_corrections.yml index 16f8fc035..31d0b361e 100644 --- a/fix_manual_corrections.yml +++ b/fix_manual_corrections.yml @@ -391,9 +391,6 @@ BIOMD0000000683: - filename: 'MODEL1006230062.sedml' type: 'rename_file' new: 'BIOMD0000000683.sedml' - - filename: 'MODEL1006230062.xml' - type: 'rename_file' - new: 'BIOMD0000000683.xml' - filename: 'BIOMD0000000683.sedml' type: replace_text old: source="MODEL1006230062.xml" diff --git a/rename_sbml_files.py b/rename_sbml_files.py index 8df13b3c0..01d684c30 100644 --- a/rename_sbml_files.py +++ b/rename_sbml_files.py @@ -49,11 +49,8 @@ def run(id, sbml_filenames, sbml_master): os.rename(filename, newfilename) remove_list.append((filename, newfilename)) for (old, new) in remove_list: - try: - sbml_filenames.remove(old) - sbml_filenames.append(new) - except: - pass + sbml_filenames.remove(old) + sbml_filenames.append(new) if id in REMOVE: old = REMOVE[id] if sbml_master == old: