Catch nis.error and raise TestFailed instead. This catches the
problem where Python is configured with the nismodule but NIS isn't installed, or the map names don't correspond to those hardcoded in nismodule.c (which is bogus in and of itself).
This commit is contained in:
parent
1ade44cb0c
commit
4c4d5ce78a
|
@ -1,8 +1,13 @@
|
|||
from test_support import verbose
|
||||
from test_support import verbose, TestFailed
|
||||
import nis
|
||||
|
||||
print 'nis.maps()'
|
||||
maps = nis.maps()
|
||||
try:
|
||||
# the following could fail if NIS isn't active
|
||||
maps = nis.maps()
|
||||
except nis.error, msg:
|
||||
raise TestFailed, msg
|
||||
|
||||
done = 0
|
||||
for nismap in maps:
|
||||
if verbose:
|
||||
|
|
Loading…
Reference in New Issue