Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1007)

Unified Diff: scripts/slave/recipe_modules/filter/api.py

Issue 1174613003: cleanup: remove no-op try-except block in filter recipe module (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/filter/api.py
diff --git a/scripts/slave/recipe_modules/filter/api.py b/scripts/slave/recipe_modules/filter/api.py
index 8021c20710390388bafc6d61aae87eb46060c7ab..83a321e6d1787de69e44f5dac42c4b9fec83d1bb 100644
--- a/scripts/slave/recipe_modules/filter/api.py
+++ b/scripts/slave/recipe_modules/filter/api.py
@@ -142,40 +142,36 @@ class FilterApi(recipe_api.RecipeApi):
if cros_board:
kwargs['wrapper'] = self.m.chromium.get_cros_chrome_sdk_wrapper()
- try:
- if use_mb:
- if 'env' in kwargs:
- # Ensure that mb runs in a clean environment to avoid
- # picking up any GYP_DEFINES accidentally.
- del kwargs['env']
- step_result = self.m.python(
- 'analyze',
- self.m.path['checkout'].join('tools', 'mb', 'mb.py'),
- args=['analyze',
- '-m',
- self.m.properties['mastername'],
- '-b',
- self.m.properties['buildername'],
- '-v',
- build_output_dir,
- self.m.json.input(analyze_input),
- self.m.json.output()],
- step_test_data=lambda: self.m.json.test_api.output(
- test_output),
- **kwargs)
- else:
- step_result = self.m.python(
- 'analyze',
- self.m.path['checkout'].join('build', 'gyp_chromium'),
- args=['--analyzer',
- self.m.json.input(analyze_input),
- self.m.json.output()],
- step_test_data=lambda: self.m.json.test_api.output(
- test_output),
- **kwargs)
- except self.m.step.StepFailure as f:
- # TODO(phajdan.jr): De-indent above code and remove trivial try-except.
- raise
+ if use_mb:
+ if 'env' in kwargs:
+ # Ensure that mb runs in a clean environment to avoid
+ # picking up any GYP_DEFINES accidentally.
+ del kwargs['env']
+ step_result = self.m.python(
+ 'analyze',
+ self.m.path['checkout'].join('tools', 'mb', 'mb.py'),
+ args=['analyze',
+ '-m',
+ self.m.properties['mastername'],
+ '-b',
+ self.m.properties['buildername'],
+ '-v',
+ build_output_dir,
+ self.m.json.input(analyze_input),
+ self.m.json.output()],
+ step_test_data=lambda: self.m.json.test_api.output(
+ test_output),
+ **kwargs)
+ else:
+ step_result = self.m.python(
+ 'analyze',
+ self.m.path['checkout'].join('build', 'gyp_chromium'),
+ args=['--analyzer',
+ self.m.json.input(analyze_input),
+ self.m.json.output()],
+ step_test_data=lambda: self.m.json.test_api.output(
+ test_output),
+ **kwargs)
if 'error' in step_result.json.output:
self._result = True
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698