diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 66bfeb0..bf45c24 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -256,7 +256,13 @@ class _unicode_func_wrapper(object): encoding = self._encoding wrapped_args, wrapped_kwargs = self._process_args(args, kwargs) - rval = self._func(*wrapped_args, **wrapped_kwargs) + while True: + try: + rval = self._func(*wrapped_args, **wrapped_kwargs) + break + except OSError as e: + if e.errno != errno.EINTR: + raise # Don't use isinstance() since we don't want to convert subclasses # of tuple such as posix.stat_result in Python >=3.2.