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

Use single quotes in f-strings #5267

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion supervisor/homeassistant/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ async def begin_backup(self) -> None:

if resp and not resp.get(ATTR_SUCCESS):
raise HomeAssistantBackupError(
f"Preparing backup of Home Assistant Core failed due to: {resp.get(ATTR_ERROR, {}).get(ATTR_MESSAGE, "")}. Check HA Core logs.",
f"Preparing backup of Home Assistant Core failed due to: {resp.get(ATTR_ERROR, {}).get(ATTR_MESSAGE, '')}. Check HA Core logs.",
_LOGGER.error,
)

Expand Down
4 changes: 2 additions & 2 deletions supervisor/utils/systemd_journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ def journal_verbose_formatter(entries: dict[str, str]) -> str:
ts = ts[: ts.index(".") + 4] # strip TZ offset

identifier = (
f"{entries.get("SYSLOG_IDENTIFIER", "_UNKNOWN_")}[{entries["_PID"]}]"
f"{entries.get('SYSLOG_IDENTIFIER', '_UNKNOWN_')}[{entries['_PID']}]"
if "_PID" in entries
else entries.get("SYSLOG_IDENTIFIER", "_UNKNOWN_")
)

return f"{ts} {entries.get("_HOSTNAME", "")} {identifier}: {entries.get("MESSAGE", "")}"
return f"{ts} {entries.get('_HOSTNAME', '')} {identifier}: {entries.get('MESSAGE', '')}"


async def journal_logs_reader(
Expand Down
Loading