--- fsh-1.2/fshcompat.py.orig 2001-12-23 22:08:26.000000000 +1100 +++ fsh-1.2/fshcompat.py @@ -52,20 +52,23 @@ except: # in Python 2.2 as a bug. See . try: - # Stop Python 2.2 from warning that we import a deprecated module. - # But Python 1.5.2 doesn't have the warnings module, so be prepared - # for the import statement to fail. try: - import warnings - warnings.filterwarnings( - "ignore", - "the FCNTL module is deprecated; please use fcntl", - DeprecationWarning) - except ImportError: - pass + FD_CLOEXEC = fcntl.FD_CLOEXEC + except: + # Stop Python 2.2 from warning that we import a deprecated module. + # But Python 1.5.2 doesn't have the warnings module, so be prepared + # for the import statement to fail. + try: + import warnings + warnings.filterwarnings( + "ignore", + "the FCNTL module is deprecated; please use fcntl", + DeprecationWarning) + except ImportError: + pass - import FCNTL - FD_CLOEXEC = FCNTL.FD_CLOEXEC + import FCNTL + FD_CLOEXEC = FCNTL.FD_CLOEXEC except AttributeError: