Skip to content

Commit

Permalink
[pmon]: Run ledd using python3 unless excluded (#6528)
Browse files Browse the repository at this point in the history
**- Why I did it**

Ledd is the last daemon that is not enabled to run in python3.
Even though there is a plan to deprecate this daemon and to replace it by something else it's one simple step toward python2 deprecation.

**- How I did it**

Changed the `command=` line for `ledd` in the `supervisord` configuration of `pmon`.
Copied what was done for other daemons.

**- How to verify it**

Booting a product that has a `led_control.py` should now show the ledd running in python3.
I ran `python3 -m pylint` on all `led_control.py` plugin which means that most of them should be python3 compliant.
There is however still a risk that some might not work.
  • Loading branch information
Staphylo authored Jan 22, 2021
1 parent 8729fdc commit 0464d15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ dependent_startup_wait_for=rsyslogd:running

{% if not skip_ledd %}
[program:ledd]
command=/usr/local/bin/ledd
command={% if API_VERSION == 3 and 'ledd' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/ledd
priority=5
autostart=false
autorestart=false
Expand Down

0 comments on commit 0464d15

Please sign in to comment.