[mod_python] 2.7.8: os.error no longer == OSError

Gregory Bond gnb at itga.com.au
Mon Jul 21 16:29:11 EST 2003


I've got
	Apache/1.3.27 (Unix) mod_python/2.7.8 Python/2.1.1 configured
on Solaris 2.6.

Consider an mptest.py that looks like this:
	from mod_python import apache

	import os

	def handler(req):
		req.send_http_header()
		try:
			os.stat('/tmp/not.existing')
		except os.error:
			req.write("caught os.error")
		except OSError:
			req.write("Caught OSError")
		return apache.OK


This always returns "Caught OSError", never "caught os.error".  This breaks a 
whole lotta stuff, including builtin functions like os.path.exists() which 
use the "os.error" form.

What can I conceivably have done to break this????




More information about the Mod_python mailing list