Kaydet (Commit) 4c4d5ce7 authored tarafından Barry Warsaw's avatar Barry Warsaw

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).
üst 1ade44cb
from test_support import verbose from test_support import verbose, TestFailed
import nis import nis
print 'nis.maps()' 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 done = 0
for nismap in maps: for nismap in maps:
if verbose: if verbose:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment