I have just checked in a fix for: [ Bug #110670 ] Win32 os.listdir raises confusing errors http://sourceforge.net/bugs/?group_id=5470&func=detailbug&bug_id=110670 In a nutshell: >>> os.listdir('/cow') ... OSError: [Errno 3] No such process: '/cow' >>> The solution here was to use the new WindowsError object that was defined back in February (http://www.python.org/pipermail/python-dev/2000-February/008803.html) As this is a sub-class of OSError, nothing will break. However, the _look_ of the error does change. After my fix, it now looks like: >>> os.listdir('/cow') ... WindowsError: [Errno 3] The system cannot find the path specified: '/cow' >>> AGAIN - I stress - catching "OSError" or "os.error" _will_ continue to work, as WindowsError derives from OSError. It just worries me that people will start explicitly catching "WindowsError", regardless of whatever documentation we might write on the subject. Does anyone see this as a problem? Should a WindowsError masquerade as "OSError", or maybe just look a little more like it - eg, "OSError (windows)" ?? Thoughts, Mark.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4