From: Guido van Rossum Date: Thu, 4 May 2000 00:36:42 +0000 (+0000) Subject: Raise ImportError when os.fork does not exist. X-Git-Tag: v2.0b1~1853 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=495178217854e2bea9d8528d3d2a04bcf9a6078b;p=thirdparty%2FPython%2Fcpython.git Raise ImportError when os.fork does not exist. --- diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py index 0d20fb3a6df8..67e30dfdbd71 100644 --- a/Lib/test/test_fork1.py +++ b/Lib/test/test_fork1.py @@ -10,6 +10,11 @@ active threads survive in the child after a fork(); this is an error. import os, sys, time, thread +try: + os.fork +except AttributeError: + raise ImportError, "os.fork not defined -- skipping test_fork1" + LONGSLEEP = 2 SHORTSLEEP = 0.5