flatpak-coredumpctl: Pass tuple to startswith instead of two calls

This commit is contained in:
Mia McMahill
2026-05-12 16:46:08 -05:00
committed by Sebastian Wick
parent 4bcd6cd48b
commit b6ceab85c3

View File

@@ -57,7 +57,7 @@ class CoreDumper():
with open(stderr.name, "r") as stderrf:
stderr = stderrf.read()
executable, = re.findall(".*Executable: (.*)", stderr)
if not executable.startswith("/newroot/") and not executable.startswith("/app/"):
if not executable.startswith(("/newroot/", "/app/")):
print(f"Executable {executable} doesn't seem to be a flatpaked application.",
file=sys.stderr)
executable = executable.replace("/newroot", "")