From 3962dae71bae4ddcd433e5726d511d5cbb9897c9 Mon Sep 17 00:00:00 2001 From: Ritesh Harjani <riteshh@codeaurora.org> Date: Tue, 21 Mar 2017 18:27:34 +0530 Subject: [PATCH] lrdp-v2: mmcdoctor: Fix fd close and print_out_str API This closes the open files and correct the API from print_out_string to print_out_str. Change-Id: Icbf8c5f5421ac90de4440c04fb93184ed22ee7e5 --- linux-ramdump-parser-v2/parsers/mmcdoctor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-ramdump-parser-v2/parsers/mmcdoctor.py b/linux-ramdump-parser-v2/parsers/mmcdoctor.py index 0e40051..0d6a820 100644 --- a/linux-ramdump-parser-v2/parsers/mmcdoctor.py +++ b/linux-ramdump-parser-v2/parsers/mmcdoctor.py @@ -14,7 +14,7 @@ import os from parser_util import register_parser, RamParser from parsers.irqstate import IrqParse from dmesglib import DmesgLib - +from print_out import print_out_str MMC0_IRQ = 0 MMC1_IRQ = 0 @@ -99,6 +99,8 @@ class ParseMmcLog(): if (line and PATTERN_END in line): fdw.write("ERROR" + line) line = fdr.readline() + fdw.close() + fdr.close() self.ramdump.remove_file(F_MMCTEMP) @@ -362,5 +364,5 @@ class MmcDebug(RamParser): return dump_mmc_info(self.ramdump, count_irq) else: - print_out_string("\n Could not generate MMC diagnose report\n") + print_out_str("\n Could not generate MMC diagnose report\n") return -- GitLab