Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to alias fw-tool #2

Open
kript opened this issue Mar 9, 2023 · 0 comments
Open

how to alias fw-tool #2

kript opened this issue Mar 9, 2023 · 0 comments

Comments

@kript
Copy link

kript commented Mar 9, 2023

I'm probably doing this all wrong, but I would be interested in how others have got the alias working as my approach doesn't work;

$ alias fw-ectool='/home/john/code/framework-ec/build/bds/util/ectool --interface=fmw'
$ python3 cpu-usage-led.py 
Traceback (most recent call last):
  File "/home/john/code/framework-cpu-usage-led/cpu-usage-led.py", line 94, in <module>
    main()
  File "/home/john/code/framework-cpu-usage-led/cpu-usage-led.py", line 79, in main
    changeColor(math.ceil(psutil.cpu_percent() / 25), led)
  File "/home/john/code/framework-cpu-usage-led/cpu-usage-led.py", line 46, in changeColor
    changeLed(colorName, led)
  File "/home/john/code/framework-cpu-usage-led/cpu-usage-led.py", line 52, in changeLed
    subprocess.run(["fw-ectool", "led", led, colorName])
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'fw-ectool'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant