Since OSError is a superclass of WindowsError, just catch OSError.
FWIW, core developers can create an exception that is more specific than the minimum promised by the documents.
Also, the following code works fine for me (Python2.7.2 works on WindowsXP):
try: raise os.rename('nonexisting_file', 'def') except OSError: print 'caught'
source share