upip: Use uerrno module, drop errno dependency.

uerrno is a recently added builtin module.
pull/75/merge
Paul Sokolovsky 2016-05-28 02:56:11 +03:00
rodzic f64570ba71
commit d6f91563e6
3 zmienionych plików z 2 dodań i 42 usunięć

Wyświetl plik

@ -2,7 +2,7 @@ all:
# This target prepares snapshot of all dependency modules, for
# self-contained install
deps: upip_errno.py upip_gzip.py upip_utarfile.py
deps: upip_gzip.py upip_utarfile.py
upip_ffilib.py: ../ffilib/ffilib.py
cp $^ $@
@ -10,8 +10,6 @@ upip_os.py: ../os/os/__init__.py
sed -r -e 's/((ffilib|errno|stat)([^_"]|$$))/upip_\1/' $^ >$@
upip_os_path.py: ../os.path/os/path.py
sed -r -e 's/((ffilib|errno|os|stat)([^_"]|$$))/upip_\1/' $^ >$@
upip_errno.py: ../errno/errno.py
cp $^ $@
upip_gzip.py: ../gzip/gzip.py
cp $^ $@
upip_stat.py: ../stat/stat.py

Wyświetl plik

@ -12,8 +12,8 @@ def upip_import(mod, sub=None):
sys = upip_import("sys")
import uos as os
import uerrno as errno
errno = upip_import("errno")
gzip = upip_import("gzip")
try:
tarfile = upip_import("utarfile")

Wyświetl plik

@ -1,38 +0,0 @@
EPERM = 1 # Operation not permitted
ENOENT = 2 # No such file or directory
ESRCH = 3 # No such process
EINTR = 4 # Interrupted system call
EIO = 5 # I/O error
ENXIO = 6 # No such device or address
E2BIG = 7 # Argument list too long
ENOEXEC = 8 # Exec format error
EBADF = 9 # Bad file number
ECHILD = 10 # No child processes
EAGAIN = 11 # Try again
ENOMEM = 12 # Out of memory
EACCES = 13 # Permission denied
EFAULT = 14 # Bad address
ENOTBLK = 15 # Block device required
EBUSY = 16 # Device or resource busy
EEXIST = 17 # File exists
EXDEV = 18 # Cross-device link
ENODEV = 19 # No such device
ENOTDIR = 20 # Not a directory
EISDIR = 21 # Is a directory
EINVAL = 22 # Invalid argument
ENFILE = 23 # File table overflow
EMFILE = 24 # Too many open files
ENOTTY = 25 # Not a typewriter
ETXTBSY = 26 # Text file busy
EFBIG = 27 # File too large
ENOSPC = 28 # No space left on device
ESPIPE = 29 # Illegal seek
EROFS = 30 # Read-only file system
EMLINK = 31 # Too many links
EPIPE = 32 # Broken pipe
EDOM = 33 # Math argument out of domain of func
ERANGE = 34 # Math result not representable
EAFNOSUPPORT = 97 # Address family not supported by protocol
ECONNRESET = 104 # Connection timed out
ETIMEDOUT = 110 # Connection timed out
EINPROGRESS = 115 # Operation now in progress