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

fix(LHM): proper SensorID string encoding for request URL. #75

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/core/widgets/yasb/libre_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from core.validation.widgets.yasb.libre_monitor import VALIDATION_SCHEMA
from core.widgets.base import BaseWidget
from urllib.parse import quote


class LibreHardwareMonitorWidget(BaseWidget):
Expand Down Expand Up @@ -79,7 +80,7 @@ def __init__(
self._network_manager.authenticationRequired.connect(self._handle_authentication)

# Create a request
url = QUrl(f"http://{self._server_host}:{self._server_port}/Sensor?action=Get&id={self._sensor_id}")
url = QUrl(f"http://{self._server_host}:{self._server_port}/Sensor?action=Get&id={quote(self._sensor_id)}")
self.request = QNetworkRequest(url)
self.request.setHeader(
QNetworkRequest.KnownHeaders.ContentTypeHeader,
Expand Down