KodiIdleTime: Remove surplus brace #2337
ci.yml
on: pull_request
Matrix: test
lint-commits
14s
release
0s
Annotations
1 error
lint-commits
You have commit messages with errors
⧗ input: fix(kodi-idle-time): Send proper request
This commit fixes a syntax error in the request sent to Kodi in the
KodiIdleTime check. A sample request from autosuspend is following:
{{"jsonrpc": "2.0", "id": 1, "method": "XBMC.GetInfoBooleans","params": {"booleans": ["System.IdleTime(300)"]}}
It has a surplus opening curly brace at the beginning, leading Kodi to
ignore the request with the following log entry:
error <general>: JSONRPC: Failed to parse [the above request]
This leads to the following exception in autosuspend:
autosuspend.Processor - WARNING - Check kodi-browsing[class=KodiIdleTime] failed. Ignoring...
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/autosuspend/checks/kodi.py", line 93, in check
if not reply["result"][f"System.IdleTime({self._idle_time})"]:
~~~~~^^^^^^^^^^
KeyError: 'result'
✖ body's lines must not be longer than 100 characters [body-max-line-length]
✖ subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]
✖ found 2 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
|