From 19f07c600c1c5f142c06b8261360e230b97b2c69 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Tue, 25 Nov 2014 14:09:06 -0800 Subject: [PATCH] Add a TODO for retrying pull request #20 Sometime in a future retrying version there will likely/hopefully exist a ability to more easily filter on specific exceptions; this commit adds a note to the upstream pull request that may add this feature. Change-Id: I44f1c9fe4fbbd5f77032ca7bfff4e2e6b7ff7622 --- oslo_concurrency/lockutils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oslo_concurrency/lockutils.py b/oslo_concurrency/lockutils.py index ae1c498..e9fd4d7 100644 --- a/oslo_concurrency/lockutils.py +++ b/oslo_concurrency/lockutils.py @@ -103,6 +103,9 @@ def _lock_retry(delay, filename, # raises a new or different exception the original exception will be # replaced with that one and raised). def retry_on_exception(e): + # TODO(harlowja): once/if https://github.com/rholder/retrying/pull/20 + # gets merged we should just switch to using that to avoid having to + # catch and inspect all execeptions (and there types...) if isinstance(e, IOError) and e.errno in (errno.EACCES, errno.EAGAIN): return True raise threading.ThreadError(_("Unable to acquire lock on"