summaryrefslogtreecommitdiffstats
path: root/Lib/dos-8x3/test_err.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-05-08 23:14:57 (GMT)
committerGuido van Rossum <guido@python.org>1997-05-08 23:14:57 (GMT)
commitde554ece418b241ad5058b1e600040c0d1c01891 (patch)
tree787ca28dc2f8582e7ce7f0bb535ef865bf1c7f9f /Lib/dos-8x3/test_err.py
parent6dd87830d091673741a4aabfb0680ae5ca64c257 (diff)
downloadcpython-de554ece418b241ad5058b1e600040c0d1c01891.zip
cpython-de554ece418b241ad5058b1e600040c0d1c01891.tar.gz
cpython-de554ece418b241ad5058b1e600040c0d1c01891.tar.bz2
The usual.
Diffstat (limited to 'Lib/dos-8x3/test_err.py')
-rw-r--r--Lib/dos-8x3/test_err.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/Lib/dos-8x3/test_err.py b/Lib/dos-8x3/test_err.py
index 6951255..7228fdf 100644
--- a/Lib/dos-8x3/test_err.py
+++ b/Lib/dos-8x3/test_err.py
@@ -23,7 +23,7 @@ errors = ['E2BIG', 'EACCES', 'EADDRINUSE', 'EADDRNOTAVAIL', 'EADV',
'ENODEV', 'ENOENT', 'ENOEXEC', 'ENOLCK', 'ENOLINK',
'ENOMEM', 'ENOMSG', 'ENONET', 'ENOPKG', 'ENOPROTOOPT',
'ENOSPC', 'ENOSR', 'ENOSTR', 'ENOSYS', 'ENOTBLK',
- 'ENOTCONN', 'ENOTDIR', 'ENOTEMPTY', 'ENOTSOCK',
+ 'ENOTCONN', 'ENOTDIR', 'ENOTEMPTY', 'ENOTOBACCO', 'ENOTSOCK',
'ENOTTY', 'ENOTUNIQ', 'ENXIO', 'EOPNOTSUPP',
'EOVERFLOW', 'EPERM', 'EPFNOSUPPORT', 'EPIPE',
'EPROTO', 'EPROTONOSUPPORT', 'EPROTOTYPE',
@@ -39,6 +39,11 @@ errors = ['E2BIG', 'EACCES', 'EADDRINUSE', 'EADDRNOTAVAIL', 'EADV',
# test seems to work on SGI, Sparc & intel Solaris, and linux.
#
for error in errors:
- a = getattr(errno, error)
- if verbose:
- print '%s: %d' % (error, a)
+ try:
+ a = getattr(errno, error)
+ except AttributeError:
+ if verbose:
+ print '%s: not found' % error
+ else:
+ if verbose:
+ print '%s: %d' % (error, a)