Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
yocalebo committed Dec 26, 2024
1 parent 552f9fa commit 414aec1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/middlewared/middlewared/plugins/zfs_/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,19 @@ def paths_to_datasets_impl(
on ZFS or if the boot pool underlies the path. In
addition to this, all the normal exceptions that
can be raised by a failed call to os.stat() are
possible.
possible. If any exception occurs, the dataset name
will be set to None in the dictionary.
"""
rv = dict()
if mntinfo is None:
mntinfo = getmntinfo()

for path in paths:
rv[path] = path_to_dataset_impl(path, mntinfo)
try:
rv[path] = path_to_dataset_impl(path, mntinfo)
except Exception:
rv[path] = None

return rv


Expand Down

0 comments on commit 414aec1

Please sign in to comment.