parameters: (exc)
return_statement: return exc.errno in (errno.EPERM, errno.EACCES) or \
          getattr(exc, "winerror", -1) in (cext.ERROR_ACCESS_DENIED,
                                           cext.ERROR_PRIVILEGE_NOT_HELD)
docstring: Return True if this is a permission error.
docstring_summary: Return True if this is a permission error.
docstring_tokens: Return True if this is a permission error .
function: def is_permission_err(exc):
      """Return True if this is a permission error."""
      assert isinstance(exc, OSError), exc
      # On Python 2 OSError doesn't always have 'winerror'. Sometimes
      # it does, in which case the original exception was WindowsError
      # (which is a subclass of OSError).
      return exc.errno in (errno.EPERM, errno.EACCES) or \
          getattr(exc, "winerror", -1) in (cext.ERROR_ACCESS_DENIED,
                                           cext.ERROR_PRIVILEGE_NOT_HELD)
function_tokens: def is_permission_err ( exc ) : assert isinstance ( exc , OSError ) , exc # On Python 2 OSError doesn't always have 'winerror'. Sometimes # it does, in which case the original exception was WindowsError # (which is a subclass of OSError). return exc . errno in ( errno . EPERM , errno . EACCES ) or getattr ( exc , "winerror" , - 1 ) in ( cext . ERROR_ACCESS_DENIED , cext . ERROR_PRIVILEGE_NOT_HELD )