Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Jan 26, 2024
1 parent c5f0111 commit 191ce20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metomi/rose/config_processors/fileinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"""Process "file:*" sections in node of a metomi.rose.config_tree.ConfigTree.
"""

from contextlib import suppress
from fnmatch import fnmatch
from glob import glob
from io import BytesIO
Expand Down Expand Up @@ -106,6 +107,9 @@ def process(
finally:
if cwd != os.getcwd():
self.manager.fs_util.chdir(cwd)
if loc_dao.conn:
with suppress(Exception):
loc_dao.conn.close()

def _process(self, conf_tree, nodes, loc_dao, **kwargs):
"""Helper for self.process."""
Expand Down

0 comments on commit 191ce20

Please sign in to comment.