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:
		@@ -103,6 +103,9 @@ def _lock_retry(delay, filename,
 | 
				
			|||||||
    # raises a new or different exception the original exception will be
 | 
					    # raises a new or different exception the original exception will be
 | 
				
			||||||
    # replaced with that one and raised).
 | 
					    # replaced with that one and raised).
 | 
				
			||||||
    def retry_on_exception(e):
 | 
					    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):
 | 
					        if isinstance(e, IOError) and e.errno in (errno.EACCES, errno.EAGAIN):
 | 
				
			||||||
            return True
 | 
					            return True
 | 
				
			||||||
        raise threading.ThreadError(_("Unable to acquire lock on"
 | 
					        raise threading.ThreadError(_("Unable to acquire lock on"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user