[SOLVED] setuphelpers.killalltask function (needs fixing?)

Share your experience and thoughts about WAPT here / Come here and talk about your experience with Wapt, your opinion and your wishes
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is provided on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version (1.8.2 / 2.0 / 2.1 / 2.2 / etc.) AS WELL AS the Enterprise / Discovery edition.
* Specify the server OS (Linux / Windows) and version (Debian Stretch/Buster - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine (Windows 7 / 10)
. * As with any community forum, support is provided voluntarily by members. If you require sales support, you can contact the Tranquil IT sales department at 02.40.97.57.55
Locked
louisinger
Messages: 27
Registration: June 26, 2018 - 09:40

June 28, 2018 - 11:23

Good morning,

I've just noticed a slight problem with the killalltask function. This occurs, for example, when install_msi_if_needed() is called like this:

Code: Select all

install_msi_if_needed(msi = msi, remove_old_version = True, killbefore = None)
If :
1. killbefore = None (default value)
2. remove_old_version = True
SO :
As :

Code: Select all

if remove_old_version :
        killalltasks(killbefore)
        remove_previous_version(key,min_version)
so killalltask will be called with the value None and killalltask(None) = AttributeError: 'NoneType' object has no attribute 'lower'

I'm not sure about this and maybe there's an explanation, but in doubt I preferred to post a message.
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

October 16, 2018 - 4:09 PM

Yes, we need to add a test...
Thank you!
Tranquil IT
Locked