plugins
plugins copied to clipboard
[husky2]: bug fix
Fixed a endless loop wich was caused by a wrong/outdated check if the update_item() call came from the plugin itself.
I don't get, which problem is fixed by this PR.
-
get_fullname() is only needed in multiinstance capable plugins to distinguish the instances of the plugin. It adds the instance name to the plugin nam. This plugin is not mulitinstance capable.
-
the caller parameter is a string. The comparision
caller != self.get_shortname()(orcaller != self.get_fullname()). Why are you looking for a substring?
Nach dem erfolgreichen Senden von Befehlen werden die entsprechedenen (Bool-) Items vom Plugin selbst wieder auf False zurückgesetzt (caller ist dabei auf fullname gesetzt). Da aber der caller in der update_item() manchmal als Eval:husky2 anstatt nur husky2 ankommt, suche ich einfach nach dem Substring. Wenn ich das nicht mache, habe ich ab und zu eine Endlosschleife in der update_tiem() nachdem ich einen Befehl sende und sh verabschiedet sich.
Ob ich fullname oder shortname verwende ist hier logisch egal, aber ist auch nicht schlimm wenns der fullname ist.
PS: dieser Fehelr tritt nur im develop branch auf.