diff --git a/Lib/test/test_dl.py b/Lib/test/test_dl.py index e7902cc5e06..53c98e68fe5 100755 --- a/Lib/test/test_dl.py +++ b/Lib/test/test_dl.py @@ -8,6 +8,7 @@ sharedlibs = [ ('/usr/lib/libc.so', 'getpid'), + ('/lib/libc.so.6', 'getpid'), ] for s, func in sharedlibs: @@ -15,9 +16,9 @@ if verbose: print 'trying to open:', s, l = dl.open(s) - except dl.error: + except dl.error, err: if verbose: - print 'failed' + print 'failed', repr(str(err)) pass else: if verbose: @@ -28,4 +29,4 @@ print 'worked!' break else: - print 'Could not open any shared libraries' + raise ImportError, 'Could not open any shared libraries'