From 7a46ec65b2a0c129b78f2ff706108a8477699de4 Mon Sep 17 00:00:00 2001 From: Jay Cho Date: Tue, 18 Sep 2018 17:38:11 +0900 Subject: [PATCH] [Tools] Update code checker (#476) * [Tools] Update code checker * Update PRManager.py --- tools/scripts/CodeChecker/PRManager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/scripts/CodeChecker/PRManager.py b/tools/scripts/CodeChecker/PRManager.py index 9035ff2..1f20ca0 100644 --- a/tools/scripts/CodeChecker/PRManager.py +++ b/tools/scripts/CodeChecker/PRManager.py @@ -15,9 +15,11 @@ class PRManager: self.fileDiffHunkPairs = {} for file in self.changedFiles: + if file.patch is None: + continue _patchLines = file.patch.split("\n") self._CreatePositionMap(file, _patchLines) - _patchLines[:] = [line for line in _patchLines if "@@" in line] + _patchLines[:] = [line for line in _patchLines if "@@ " in line] _diffLines = [] for hunkline in _patchLines: hunkline = hunkline[2:] -- 2.7.4