RBD: Check for OSError before using errno
Change-Id: I40d46ddbe1e5a4e8c48a38f8b52f7281c5e0f7dd Closes-Bug: #1852471
This commit is contained in:
parent
3e048975d0
commit
25a5145a9d
|
@ -389,7 +389,8 @@ class RBDDriver(driver.CloneableImageVD, driver.MigrateVD,
|
|||
# so that the periodic purge retries on the next iteration
|
||||
# and leaves ERRORs in the logs in case the deletion fails
|
||||
# repeatedly.
|
||||
if e.errno == errno.EPERM:
|
||||
# pylint: disable=E1101
|
||||
if (e is OSError) and (e.errno == errno.EPERM):
|
||||
LOG.debug("%s has not expired yet on backend '%s'",
|
||||
vol.get('name'),
|
||||
self._backend_name)
|
||||
|
|
Loading…
Reference in New Issue