Skip to content

added arg for manual KB number - #23

Merged
NeffIsBack merged 2 commits into
NeffIsBack:masterfrom
rtfmkiesel:master
Aug 16, 2026
Merged

added arg for manual KB number#23
NeffIsBack merged 2 commits into
NeffIsBack:masterfrom
rtfmkiesel:master

Conversation

@rtfmkiesel

Copy link
Copy Markdown
Contributor

If the payload was invalid/errored, Windows caches the failed KB and will try over and over to install it. If the KB ID however does not change on wsuks, it will try to download the newer (fixed payload) KB again

@rtfmkiesel

Copy link
Copy Markdown
Contributor Author

I've also added a quick fix, as I got the following error:

    self.logger.debug(f"Client Report: {post_data_report.TargetID.text}, {post_data_report.ComputerBrand.text}, {post_data_report.ComputerModel.text}, {post_data_report.ExtendedData.ReplacementStrings.string}.")
                                                                                                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'string'

No idea if this is from a regular WSUS client update, or just my QEMU emulated Windows 11 machines, however it seems that not every request has ReplacementStrings.

@NeffIsBack

NeffIsBack commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR!

Can you give me a little more info about the error? What request was it? Don't wanna just patch something into the project without really knowing what is going on. Did it completely crash the app or "just" threw an error message?

Rest looks good

@NeffIsBack

Copy link
Copy Markdown
Owner

Please also check ruff, there seems to be a format issue

@rtfmkiesel

Copy link
Copy Markdown
Contributor Author

Fixed a whitespace issue. Ruff throws more errors in places where I did not touch stuff. I'm not touching those unless you want me to.

[master][…/wsuks]$ python -V
Python 3.10.12
[master][…/wsuks]$ ruff -V
ruff 0.16.3
[master][…/wsuks]! ruff check . | grep help | sort | uniq
help: Replace rule code with `builtin-import-shadowing`
help: Replace rule code with `empty-docstring`
help: Replace rule code with `implicit-return`
help: Replace rule code with `incorrect-blank-line-after-class`
help: Replace rule code with `incorrect-blank-line-before-class`
help: Replace rule code with `line-too-long`
help: Replace rule code with `missing-blank-line-after-last-section`
help: Replace rule code with `missing-blank-line-after-summary`
help: Replace rule code with `missing-terminal-punctuation`
help: Replace rule code with `missing-trailing-period`
help: Replace rule code with `multi-line-summary-first-line`
help: Replace rule code with `multi-line-summary-second-line`
help: Replace rule code with `mutable-class-default`
help: Replace rule code with `non-imperative-mood`
help: Replace rule code with `superfluous-else-break`
help: Replace rule code with `superfluous-else-continue`
help: Replace rule code with `superfluous-else-raise`
help: Replace rule code with `superfluous-else-return`
help: Replace rule code with `try-except-in-loop`
help: Replace rule code with `undefined-local-with-import-star-usage`
help: Replace rule code with `undocumented-magic-method`
help: Replace rule code with `undocumented-param`
help: Replace rule code with `undocumented-public-class`
help: Replace rule code with `undocumented-public-function`
help: Replace rule code with `undocumented-public-init`
help: Replace rule code with `undocumented-public-method`
help: Replace rule code with `undocumented-public-module`
help: Replace rule code with `undocumented-public-nested-class`
help: Replace rule code with `undocumented-public-package`
help: Replace rule code with `unused-unpacked-variable`
help: Replace rule code with `used-dummy-variable`
help: Use `ruff: ignore` instead

Regarding the WSUS error message, I've reverted the change. As of this morning, I cannot reproduce the error anymore, even on a brand new Windows 11 client. This week, I got this when targeting Windows 11 24H2 clients pretty consistently. ¯_(ツ)_/¯

@NeffIsBack

Copy link
Copy Markdown
Owner

Fixed a whitespace issue. Ruff throws more errors in places where I did not touch stuff. I'm not touching those unless you want me to.

That is totally fine and the way it should be. Looks like this is a discrepancy because you have ruff installed natively and not the fixed version specified in the lock file (which is totally fine, but that explains the discrepancy between the cli report and your reported issues).

Regarding the WSUS error message, I've reverted the change. As of this morning, I cannot reproduce the error anymore, even on a brand new Windows 11 client. This week, I got this when targeting Windows 11 24H2 clients pretty consistently. ¯_(ツ)_/¯

Hmm interesting. Feel free to open a new PR then, should you run into this again and you can investigate what this is. Because so far I never noticed this error (against several Win 10/11/server versions) and I would like to know what the cause is.

@NeffIsBack NeffIsBack added the enhancement New feature or request label Aug 14, 2026

@NeffIsBack NeffIsBack left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM:

Image

@NeffIsBack
NeffIsBack merged commit 7e0a179 into NeffIsBack:master Aug 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants