diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-07-11 21:31:14 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-07-11 21:31:14 +0100 |
commit | 7df6b76ef9c06107eb83c1f71c3e583eaa9d2c79 (patch) | |
tree | 6fced585f19150928f2b979827a27f2daee4c348 /errno | |
parent | 3db91a5854ddf3fe8843c5e141c11d69fb7b61b5 (diff) | |
download | extrautils-7df6b76ef9c06107eb83c1f71c3e583eaa9d2c79.tar.gz |
Remove errno, now in moreutils
Diffstat (limited to 'errno')
-rwxr-xr-x | errno | 30 |
1 files changed, 0 insertions, 30 deletions
@@ -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 - |