From 5975539c580d7ec4fc4bf72997f4e873668b4a7c Mon Sep 17 00:00:00 2001 From: Danny Park Date: Sat, 18 Jun 2016 16:12:08 -0400 Subject: [PATCH] fix Tool._patch: no need to check return code because it is always zero, unless exception is thrown --- tools/__init__.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tools/__init__.py b/tools/__init__.py index cbc83db84..cf1c08ebf 100644 --- a/tools/__init__.py +++ b/tools/__init__.py @@ -324,12 +324,8 @@ def executable_path(self): return os.path.join(self.bin_path, self.executable) def apply_patches(self): - result = None for path, patch in self.patches: - result = self._patch(path, patch) - if result.returncode != 0: - return result - return result + self._patch(path, patch) def _patch(self, path, patch): @@ -340,7 +336,7 @@ def _patch(self, path, patch): file_path = os.path.join(self.env_path, path) patch_path = os.path.join( util.file.get_project_path(), 'tools', 'patches', patch) - return subprocess.check_call(['patch', file_path, patch_path]) + subprocess.check_call(['patch', file_path, patch_path]) @property def _package_installed(self): @@ -533,10 +529,7 @@ def install_package(self): if data["success"] == True: _log.debug("Package installed.") - result = self.apply_patches() - if result and result.returncode != 0: - _log.error("Failed to apply patches.") - return + self.apply_patches() else: if "success" in data.keys() and data["success"]: