Skip to content

EnsureDispatch: Check for the class attribute 'CLSID' instead of the instance attribute#2353

Merged
mhammond merged 1 commit intomhammond:mainfrom
geppi:bug_CLSID
Oct 15, 2024
Merged

EnsureDispatch: Check for the class attribute 'CLSID' instead of the instance attribute#2353
mhammond merged 1 commit intomhammond:mainfrom
geppi:bug_CLSID

Conversation

@geppi
Copy link
Copy Markdown
Collaborator

@geppi geppi commented Aug 5, 2024

to decide if building makepy support is required.

The current code is checking for the CLSID atttribute of the instance created by win32com.client.Dispatch().
This attribute is never set on the instance and therefore the condition is always True and the code to build the makepy support is always executed.

The changed code does instead check for the CLSID class attribute which is set by the code that builds the makepy support and therefore avoids executing this code again if the makepy support already exists.

This pull request resolves #2354.

to decide if building makepy support is required.
@geppi geppi changed the title Check for the class attribute 'CLSID' instead of the instance attribute EnsureDispatch: Check for the class attribute 'CLSID' instead of the instance attribute Aug 5, 2024
Copy link
Copy Markdown
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, thanks.

@mhammond mhammond merged commit 37875dd into mhammond:main Oct 15, 2024
@geppi geppi deleted the bug_CLSID branch October 18, 2024 10:06
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.

BUG: EnsureDispatch always executes the code to build makepy support even if it already exists.

2 participants