streetturtle / awesome-wm-widgets

Widgets for Awesome Window Manager
http://pavelmakhov.com/awesome-wm-widgets/
MIT License
2.16k stars 279 forks source link

A few errors in the email widget #369

Open streetturtle opened 2 years ago

streetturtle commented 2 years ago

Discussed in https://github.com/streetturtle/awesome-wm-widgets/discussions/358

Originally posted by **Hamster-of-power** June 25, 2022 Hi, I am new to Github, so sorry, if this is not the "correct" way of reporting. There were a few errors that I would like to point out: 1. It says email_icon:set_image(path_to_icons .. "/mail-mark-new.png") That, png does not exist. Maybe try email_icon:set_image(path_to_icons .. "/mail-message-new.png")? 2. In the show_emails()function, you are using python. However, it requires python3. For python3, however, the print function of /home//.config/awesome/email-widget/read_unread_emails.py needs brackets in two places: line 10 print("No messages found!") and line 16 print("ERROR getting message", num) Great program btw.
Ryuno-Ki commented 2 years ago

Well, yes and no.

https://github.com/streetturtle/awesome-wm-widgets/blob/5358c40a029252c1bfcabb4132e05621934a2cf6/email-widget/read_unread_emails.py#L1

says Python. Depending on the OS that could be very well Python2 (thinking of Debian), even though it reached EOL.

I'd recommend to update the Shebang to python3 while fixing this.

Just from reading I can see some non-idiomatic bits as well. You might want to stop dealing with them entirely by using black or blue.