mirror of
https://github.com/flatpak/flatpak.git
synced 2026-06-16 12:30:58 -04:00
flatpak-coredumpctl: Pass tuple to startswith instead of two calls
This commit is contained in:
committed by
Sebastian Wick
parent
4bcd6cd48b
commit
b6ceab85c3
@@ -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", "")
|
||||
|
||||
Reference in New Issue
Block a user