summaryrefslogtreecommitdiff
path: root/errno
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-07-11 21:31:14 +0100
committerLars Wirzenius <liw@liw.fi>2012-07-11 21:31:14 +0100
commit7df6b76ef9c06107eb83c1f71c3e583eaa9d2c79 (patch)
tree6fced585f19150928f2b979827a27f2daee4c348 /errno
parent3db91a5854ddf3fe8843c5e141c11d69fb7b61b5 (diff)
downloadextrautils-7df6b76ef9c06107eb83c1f71c3e583eaa9d2c79.tar.gz
Remove errno, now in moreutils
Diffstat (limited to 'errno')
-rwxr-xr-xerrno30
1 files changed, 0 insertions, 30 deletions
diff --git a/errno b/errno
deleted file mode 100755
index ba95105..0000000
--- a/errno
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/python
-
-import errno
-import os
-import sys
-
-names = [name for name in dir(errno) if name.startswith('E')]
-codes = dict((name, getattr(errno, name)) for name in names)
-texts = dict((name, os.strerror(codes[name])) for name in names)
-
-def report(name):
- print name, codes[name], texts[name]
-
-for arg in sys.argv[1:]:
- if arg in names:
- report(arg)
- else:
- for name, code in codes.iteritems():
- if arg == str(code):
- report(name)
- break
- else:
- found = False
- for name, text in texts.iteritems():
- if arg.lower() in text.lower():
- report(name)
- found = True
- if not found:
- print 'Unknown:', arg
-