In article <[email protected]>, <[email protected]> wrote: >On 07:53 pm, [email protected] wrote: >>In article <[email protected]>, >>Peng Yu <[email protected]> wrote: >>> >>>It's not clear to me whether WindowsError is available on linux or >>>not, after I read the document. >> >>Here's what I told a co-worker to do yesterday: >> >>if os.name =3D=3D 'nt': >> DiskError =3D (OSError, WindowsError) >>else: >> DiskError =3D WindowsError >> >>try: >> disk_operation() >>except DiskError: >> logit() > >This isn't necessary. WindowsError subclasses OSError.
Thanks! Much appreciated! (I haven't done much Windows programming in the past -- and would have preferred to keep it that way. ;-) -- Aahz ([email protected]) <*> http://www.pythoncraft.com/ The best way to get information on Usenet is not to ask a question, but to post the wrong information. -- http://mail.python.org/mailman/listinfo/python-list
