ultrabug / py3status

py3status is an extensible i3status wrapper written in python
https://ultrabug.github.io/py3status/
BSD 3-Clause "New" or "Revised" License
893 stars 261 forks source link

module: bring back error messages #2203

Closed lasers closed 1 year ago

lasers commented 1 year ago

I added nvidia_smi to py3status on VM -- It doesn't print anything. Strange... Not even an error too?

https://github.com/ultrabug/py3status/pull/1972 is the first bad commit.

This bring back error messages (i.e. package not installed) on post_config_hook and maybe others too.

Simple diff test w/ static_string.

+++ b/py3status/modules/static_string.py
@@ -17,6 +17,9 @@ class Py3status:
     # available configuration parameters
     format = "Hello, world!"

+    def post_config_hook(self):
+        self.py3.error("Bye, world!")
+
     def static_string(self):
         return {
             "cached_until": self.py3.CACHE_FOREVER,

Note: I don't know if this changes your code. Just a small tweak to bring it back. Idk about your code. Thanks.

ultrabug commented 1 year ago

Thanks for spotting this... the correct (I hope) fix is #2208