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

Unified Diff: tools/telemetry/telemetry/core/browser_finder.py

Issue 739623005: [Telemetry] Resolve errors due to new pylint checker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ready to land Created 6 years, 1 month 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
Index: tools/telemetry/telemetry/core/browser_finder.py
diff --git a/tools/telemetry/telemetry/core/browser_finder.py b/tools/telemetry/telemetry/core/browser_finder.py
index 9fc34e75deab9818dc8fe4f8cb9ab151f5e6785b..eb189aff2c161a96f1135a369599e4b3c0054f4d 100644
--- a/tools/telemetry/telemetry/core/browser_finder.py
+++ b/tools/telemetry/telemetry/core/browser_finder.py
@@ -8,6 +8,7 @@ import logging
import operator
from telemetry import decorators
+from telemetry.core import browser_finder_exceptions
from telemetry.core.backends.chrome import android_browser_finder
from telemetry.core.backends.chrome import cros_browser_finder
from telemetry.core.backends.chrome import desktop_browser_finder
@@ -25,14 +26,6 @@ BROWSER_FINDERS = [
]
-class BrowserTypeRequiredException(Exception):
- pass
-
-
-class BrowserFinderException(Exception):
- pass
-
-
def FindAllBrowserTypes(options):
return reduce(operator.add,
[bf.FindAllBrowserTypes(options) for bf in BROWSER_FINDERS])
@@ -52,19 +45,19 @@ def FindBrowser(options):
BrowserFinderException: Options improperly set, or an error occurred.
"""
if options.browser_type == 'exact' and options.browser_executable == None:
- raise BrowserFinderException(
+ raise browser_finder_exceptions.BrowserFinderException(
'--browser=exact requires --browser-executable to be set.')
if options.browser_type != 'exact' and options.browser_executable != None:
- raise BrowserFinderException(
+ raise browser_finder_exceptions.BrowserFinderException(
'--browser-executable requires --browser=exact.')
if options.browser_type == 'cros-chrome' and options.cros_remote == None:
- raise BrowserFinderException(
+ raise browser_finder_exceptions.BrowserFinderException(
'browser_type=cros-chrome requires cros_remote be set.')
if (options.browser_type != 'cros-chrome' and
options.browser_type != 'cros-chrome-guest' and
options.cros_remote != None):
- raise BrowserFinderException(
+ raise browser_finder_exceptions.BrowserFinderException(
'--remote requires --browser=cros-chrome or cros-chrome-guest.')
browsers = []
@@ -95,7 +88,7 @@ def FindBrowser(options):
browsers[0].UpdateExecutableIfNeeded()
return browsers[0]
- raise BrowserTypeRequiredException(
+ raise browser_finder_exceptions.BrowserTypeRequiredException(
'--browser must be specified. Available browsers:\n%s' %
'\n'.join(sorted(set([b.browser_type for b in browsers]))))
« no previous file with comments | « tools/telemetry/telemetry/core/browser_credentials.py ('k') | tools/telemetry/telemetry/core/browser_finder_exceptions.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698