Package coro :: Module oserrors
[hide private]
[frames] | no frames]

Module oserrors

OSError mapping.

This module maps OSErrors to specific, catchable exceptions. For example, an OSError with an errno of ENOENT will be raised as the ENOENT exception. All exceptions derive from OSError, so it is compatible with regular OSError handling.

Classes [hide private]
  E2BIG
  EACCES
  EADDRINUSE
  EADDRNOTAVAIL
  EAFNOSUPPORT
  EAGAIN
  EALREADY
  EBADF
  EBADMSG
  EBUSY
  ECHILD
  ECONNABORTED
  ECONNREFUSED
  ECONNRESET
  EDEADLK
  EDESTADDRREQ
  EDOM
  EDQUOT
  EEXIST
  EFAULT
  EFBIG
  EHOSTDOWN
  EHOSTUNREACH
  EIDRM
  EILSEQ
  EINPROGRESS
  EINTR
  EINVAL
  EIO
  EISCONN
  EISDIR
  ELOOP
  EMFILE
  EMLINK
  EMSGSIZE
  EMULTIHOP
  ENAMETOOLONG
  ENETDOWN
  ENETRESET
  ENETUNREACH
  ENFILE
  ENOBUFS
  ENODEV
  ENOENT
  ENOEXEC
  ENOLCK
  ENOLINK
  ENOMEM
  ENOMSG
  ENOPROTOOPT
  ENOSPC
  ENOSYS
  ENOTBLK
  ENOTCONN
  ENOTDIR
  ENOTEMPTY
  ENOTSOCK
  ENOTTY
  ENXIO
  EOPNOTSUPP
  EOVERFLOW
  EPERM
  EPFNOSUPPORT
  EPIPE
  EPROTO
  EPROTONOSUPPORT
  EPROTOTYPE
  ERANGE
  EREMOTE
  EROFS
  ESHUTDOWN
  ESOCKTNOSUPPORT
  ESPIPE
  ESRCH
  ESTALE
  ETIMEDOUT
  ETOOMANYREFS
  ETXTBSY
  EUSERS
  EXDEV
  c
Functions [hide private]
 
map_exception(...)
Raise an errno-specific exception.
 
raise_oserror(...)
Raise an OSError exception by errno.
Variables [hide private]
  __g = {'E2BIG': <class 'coro.oserrors.E2BIG'>, 'EACCES': <clas...
  __package__ = 'coro'
  __test__ = {}
  err_map = {1: <class 'coro.oserrors.EPERM'>, 2: <class 'coro.o...
  errcode = 92
  errname = 'EPROTO'
Function Details [hide private]

map_exception(...)

 
Raise an errno-specific exception.
Parameters:
  • e - : The OSError instance.

raise_oserror(...)

 
Raise an OSError exception by errno.
Parameters:
  • error_number - : The errno value to raise.

Variables Details [hide private]

__g

Value:
{'E2BIG': <class 'coro.oserrors.E2BIG'>,
 'EACCES': <class 'coro.oserrors.EACCES'>,
 'EADDRINUSE': <class 'coro.oserrors.EADDRINUSE'>,
 'EADDRNOTAVAIL': <class 'coro.oserrors.EADDRNOTAVAIL'>,
 'EAFNOSUPPORT': <class 'coro.oserrors.EAFNOSUPPORT'>,
 'EAGAIN': <class 'coro.oserrors.EAGAIN'>,
 'EALREADY': <class 'coro.oserrors.EALREADY'>,
 'EBADF': <class 'coro.oserrors.EBADF'>,
...

err_map

Value:
{1: <class 'coro.oserrors.EPERM'>,
 2: <class 'coro.oserrors.ENOENT'>,
 3: <class 'coro.oserrors.ESRCH'>,
 4: <class 'coro.oserrors.EINTR'>,
 5: <class 'coro.oserrors.EIO'>,
 6: <class 'coro.oserrors.ENXIO'>,
 7: <class 'coro.oserrors.E2BIG'>,
 8: <class 'coro.oserrors.ENOEXEC'>,
...