parameters: (fun)
return_statement: return wrapper
docstring: Decorator which converts OSError into NoSuchProcess or AccessDenied.
docstring_summary: Decorator which converts OSError into NoSuchProcess or AccessDenied.
docstring_tokens: Decorator which converts OSError into NoSuchProcess or AccessDenied .
function: def wrap_exceptions(fun):
      """Decorator which converts OSError into NoSuchProcess or AccessDenied."""
      @functools.wraps(fun)
      def wrapper(self, *args, **kwargs):
          try:
              return fun(self, *args, **kwargs)
          except OSError as err:
              raise convert_oserror(err, pid=self.pid, name=self._name)
      return wrapper
function_tokens: def wrap_exceptions ( fun ) : @ functools . wraps ( fun ) def wrapper ( self , * args , * * kwargs ) : try : return fun ( self , * args , * * kwargs ) except OSError as err : raise convert_oserror ( err , pid = self . pid , name = self . _name ) return wrapper