Skip to content

Custom command execution broken #345

@Kayzels

Description

@Kayzels

What happened?

Whenever trying to execute a custom script, it doesn't run. Running from the terminal says that

TypeError: check_call() got an unexpected keyword argument 'shell'

This seems to be calling helpers.check_call, which is supposed to be a wrapper for subprocess.check_call. The problem is that arguments aren't being forwarded to the inner function. This is very easily fixed by adding **kwargs to the inner function call, and to the function definition. I'd do a pull request, but I cannot get poetry working, so I can't properly test it.

Version

4.0.1

How did you install Yin & Yang?

AUR

What desktop environments are you seeing the problem on?

KDE

Which plugin causes the issue?

Custom Script

What software version do you use?

n/a

Relevant log output

Exception in thread Custom:
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/usr/lib/python3.13/threading.py", line 992, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/yin_yang/yin_yang/plugins/_plugin.py", line 56, in set_mode
    self.set_theme(theme)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/opt/yin_yang/yin_yang/plugins/custom.py", line 35, in set_theme
    helpers.check_call(command, shell=True)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
TypeError: check_call() got an unexpected keyword argument 'shell'
Successfully applied the color scheme Sweet to your current Plasma session
Exception in thread Custom:
Traceback (most recent call last):
  File "/usr/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/usr/lib/python3.13/threading.py", line 992, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/yin_yang/yin_yang/plugins/_plugin.py", line 56, in set_mode
    self.set_theme(theme)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/opt/yin_yang/yin_yang/plugins/custom.py", line 35, in set_theme
    helpers.check_call(command, shell=True)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
TypeError: check_call() got an unexpected keyword argument 'shell'
Successfully applied the color scheme BreezeLight to your current Plasma session

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions