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
This commit is contained in:
parent
46c836ee28
commit
19f07c600c
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user