[issue1386675] _winreg specifies EnvironmentError instead of WindowsError

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Re-fixed in r70832.

--
assignee: fdrake -> georg.brandl
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1386675] _winreg specifies EnvironmentError instead of WindowsError

2009-03-20 Thread Mark Hammond

Mark Hammond  added the comment:

oops - this slipped off my radar.  I agree with *both* Frederic and Tony
:)  The module promises to raise an EnvironmentError, which is does. 
However, the main killer from my POV is that a 'winerror' attribute is
likely to be of interest, and this is only available if we promise a
WindowsError.  In other words, to write code which conformed to the
docs, you would need to write:

try:
  ...
except WindowsError, exc:
  if exc.winerror==SOME_INTERESTING_CODE:...
except EnvironmentError, exc:
  # hrmph..

The second except clause is not actually necessary based on the impl,
but is according to the docs.  For this reason I'd be happy to update
the docs to reflect the implementation reality.

--
assignee: mhammond -> fdrake

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1386675] _winreg specifies EnvironmentError instead of WindowsError

2009-03-20 Thread Daniel Diniz

Changes by Daniel Diniz :


--
components: +Windows
stage:  -> test needed
type:  -> behavior
versions: +Python 2.6 -Python 2.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com