Skip to content

Commit 0997b52

Browse files
committed
Use removeprefix/removesuffix instead of incorrect lstrip/rstrip calls
1 parent e7f2a8c commit 0997b52

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

archinstall/lib/installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1633,7 +1633,7 @@ def _service_started(self, service_name: str) -> str | None:
16331633
last_execution_time = SysCommand(
16341634
f"systemctl show --property=ActiveEnterTimestamp --no-pager {service_name}",
16351635
environment_vars={'SYSTEMD_COLORS': '0'}
1636-
).decode().lstrip('ActiveEnterTimestamp=')
1636+
).decode().removeprefix('ActiveEnterTimestamp=')
16371637

16381638
if not last_execution_time:
16391639
return None

archinstall/lib/models/mirrors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def _parse_locale_mirrors(self, mirrorlist: str) -> dict[str, list[MirrorStatusE
254254

255255
url = line.removeprefix('Server = ')
256256
mirror_entry = MirrorStatusEntryV3(
257-
url=url.rstrip('$repo/os/$arch'),
257+
url=url.removesuffix('$repo/os/$arch'),
258258
protocol=urllib.parse.urlparse(url).scheme,
259259
active=True,
260260
country=current_region or 'Worldwide',

0 commit comments

Comments
 (0)