mirror of https://github.com/python/cpython.git
Slight reworking of this test. If nis.maps() gives a nis.error, then
raise an ImportError if not running verbose. This signals to the regression framework that this test isn't applicable.
This commit is contained in:
parent
2133287c3e
commit
72588741dd
|
@ -3,10 +3,13 @@
|
|||
|
||||
print 'nis.maps()'
|
||||
try:
|
||||
# the following could fail if NIS isn't active
|
||||
maps = nis.maps()
|
||||
except nis.error, msg:
|
||||
raise TestFailed, msg
|
||||
# NIS is probably not active, so this test isn't useful
|
||||
if verbose:
|
||||
raise TestFailed, msg
|
||||
# only do this if running under the regression suite
|
||||
raise ImportError, msg
|
||||
|
||||
done = 0
|
||||
for nismap in maps:
|
||||
|
|
Loading…
Reference in New Issue