$NetBSD$

--- fshcompat.py.orig	2001-12-23 05:08:26.000000000 -0600
+++ fshcompat.py
@@ -52,20 +52,23 @@ except:
 # in Python 2.2 as a bug.  See <URL:http://sourceforge.net/tracker/
 # ?func=detail&aid=496171&group_id=5470&atid=105470>.
 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:
 
