From 7b56ab7811f42847d593e20e55c255370f5f1b0d Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Tue, 2 Feb 2021 15:29:00 +0100 Subject: [PATCH] small tombstoned cleanup --- selfdrive/tombstoned.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/selfdrive/tombstoned.py b/selfdrive/tombstoned.py index 06a175c396..e9ec73b7fd 100755 --- a/selfdrive/tombstoned.py +++ b/selfdrive/tombstoned.py @@ -156,7 +156,7 @@ def report_tombstone_apport(fn, client): crash_function = stacktrace_s[1] # Remove arguments that can contain pointers to make sentry one-liner unique - crash_function = " ".join(crash_function.split(' ')[4:]) + crash_function = " ".join(x for x in crash_function.split(' ')[1:] if not x.startswith('0x')) crash_function = re.sub(r'\(.*?\)', '', crash_function) contents = stacktrace + "\n\n" + contents @@ -174,7 +174,11 @@ def report_tombstone_apport(fn, client): # Files could be on different filesystems, copy, then delete shutil.copy(fn, os.path.join(crashlog_dir, new_fn)) - os.remove(fn) + + try: + os.remove(fn) + except PermissionError: + pass def main():