Skip to content

fix invalid handling of WindowsError on python 3 - #187

Merged
vasily-v-ryabov merged 3 commits into
enthought:masterfrom
BabbageCom:OSError
Jul 25, 2019
Merged

fix invalid handling of WindowsError on python 3#187
vasily-v-ryabov merged 3 commits into
enthought:masterfrom
BabbageCom:OSError

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented Jul 1, 2019

Copy link
Copy Markdown

fixes comtypes._comobj.winerror by no longer subscripting the exception. This pull requests makes this function use instance checking instead, raising a TypeError when the instance is neither COMError nor WindowsError.

Fixes #186

It also fixes comtypes.client.PumpEvents raising RPC_S_CALLPENDING.

@LeonarddeR LeonarddeR changed the title fix comtypes._comobj.winerror fix invalid handling of WindowsError on python 3 Jul 18, 2019
Comment thread comtypes/client/_events.py Outdated
@LeonarddeR

LeonarddeR commented Jul 18, 2019 via email

Copy link
Copy Markdown
Author

feerrenrut pushed a commit to nvaccess/nvda that referenced this pull request Jul 19, 2019
In outlook and powerpoint, we create a waiting for xx window while pumping com events. However, comtypes.client.PumpEvents now always raises an error due to a bug in comtypes, see enthought/comtypes#187

Until the bug is fixed in comtypes, this will also log a debug warning for time outs, though that's not very problematic IMO.

Fixes #9921
@LeonarddeR

Copy link
Copy Markdown
Author

@vasily-v-ryabov: Your request has been applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

comtypes._comobject.winerror raises "TypeError: 'OSError' object is not subscriptable" on Python 3.7

2 participants