From: Rishabh Dave Date: Mon, 9 Dec 2024 17:00:15 +0000 (+0530) Subject: mgr/vol: use error number instead of error message X-Git-Tag: v20.3.0~338^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0f469e2269a517f6c0bc14a003b2aeab59e24bb;p=ceph.git mgr/vol: use error number instead of error message Signed-off-by: Rishabh Dave --- diff --git a/src/pybind/mgr/volumes/fs/stats_util.py b/src/pybind/mgr/volumes/fs/stats_util.py index 3334dc5a3d76..ccb64efce902 100644 --- a/src/pybind/mgr/volumes/fs/stats_util.py +++ b/src/pybind/mgr/volumes/fs/stats_util.py @@ -5,6 +5,7 @@ and destination directory for the copy operation that is performed for snapshot cloning) and pass, print, log and convert them to human readable format conveniently. ''' +import errno from os.path import join as os_path_join from typing import Optional from logging import getLogger @@ -190,7 +191,7 @@ class CloneProgressReporter: f'Printing the exception: {e}') continue except VolumeException as e: - if e.error_str != 'error fetching subvolume metadata': + if e.errno != -errno.EINVAL: raise log.info('Exception VolumeException was raised. Apparently ' 'an entry from the metadata file of clone source '