dennisvang / tufup

Automated updates for stand-alone Python applications.
MIT License
71 stars 1 forks source link

TypeError: _install_update_win() got an unexpected keyword argument 'debug' #126

Closed dennisvang closed 3 months ago

dennisvang commented 3 months ago

Description

On Windows, calling Client.download_and_apply_update() with debug=True results in a TypeError:

TypeError: _install_update_win() got an unexpected keyword argument 'debug'

This breaks the installation of the downloaded update...

This specific bug only affects apps using the undocumented debug argument that was present in _install_update_win() before v0.4.1.

Note, however, that a similar issue would arise for any unknown kwargs passed to Client.download_and_apply_update().

Versions affected: v0.4.1 through v0.7.0

Cause

The direct cause is the replacement of the debug kwarg by a log_file_name kwarg in #41.

This is exacerbated by the fact that _install_update_win() does not accept unknown kwargs, whereas install_update() does.

Note that the _install_update_mac() function does properly accept unknown kwargs.

Solution

Let the install function accept unknown kwargs, as in: _install_update_win(..., **kwargs)

Unfortunately, any existing apps experiencing this issue cannot be fixed without a manual re-install.