def handle_file(app, executable, crash_file_path, dsym_folder='./dsym', dir_path='./crash'): CrashReportLib.app = app CrashReportLib.executable = executable CrashReportLib.dsym_folder = dsym_folder if CrashReportLib.load(): CrashReportLib.handle(crash_file_path) CrashReportLib.save()
def handle_dir(app, executable, dsym_folder='./dsym', dir_path='./crash'): CrashReportLib.app = app CrashReportLib.executable = executable CrashReportLib.dsym_folder = dsym_folder if not CrashReportLib.load(): return for dirpath, dirnames, filenames in os.walk(dir_path): for filename in filenames: if filename.endswith('.plcrash'): file_path = os.path.join(dirpath,filename) CrashReportLib.handle(file_path) Log.sep() CrashReportLib.save()