mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-01-18 02:04:12 +01:00
12 lines
268 B
Python
12 lines
268 B
Python
import errno
|
|
|
|
|
|
def eintr_retry_call(func, *args, **kwargs):
|
|
while True:
|
|
try:
|
|
return func(*args, **kwargs)
|
|
except EnvironmentError as e:
|
|
if getattr(e, 'errno', None) == errno.EINTR:
|
|
continue
|
|
raise
|