| Index: tools/telemetry/telemetry/__init__.py
|
| diff --git a/tools/telemetry/telemetry/__init__.py b/tools/telemetry/telemetry/__init__.py
|
| index cffbaac6bdb223004eaa66de39a574bec1e471eb..4d3fdc0101ba7df94a73d871ef0912e9ae28a718 100644
|
| --- a/tools/telemetry/telemetry/__init__.py
|
| +++ b/tools/telemetry/telemetry/__init__.py
|
| @@ -9,18 +9,13 @@ import logging
|
| import os
|
| import sys
|
|
|
| -
|
| -# Ensure Python >= 2.7
|
| +# Ensure Python >= 2.7.
|
| if sys.version_info < (2, 7):
|
| - logging.critical('Need Python 2.7 or greater.')
|
| - sys.exit(1)
|
| -
|
| -
|
| -from telemetry import exception_formatter
|
| -exception_formatter.InstallUnhandledExceptionFormatter()
|
| + print >> sys.stderr, 'Need Python 2.7 or greater.'
|
| + sys.exit(-1)
|
|
|
| -from telemetry import interactive_debugging
|
| -interactive_debugging.InstallDebuggingHooks()
|
| +from telemetry.util import global_hooks
|
| +global_hooks.InstallHooks()
|
|
|
| from telemetry.core.browser import Browser
|
| from telemetry.core.browser_options import BrowserFinderOptions
|
| @@ -43,32 +38,3 @@ for x in dir():
|
| if (inspect.isclass(getattr(m, x)) or
|
| inspect.isfunction(getattr(m, x))):
|
| __all__.append(x)
|
| -
|
| -
|
| -def RemoveAllStalePycFiles(base_dir):
|
| - for dirname, _, filenames in os.walk(base_dir):
|
| - if '.svn' in dirname or '.git' in dirname:
|
| - continue
|
| - for filename in filenames:
|
| - root, ext = os.path.splitext(filename)
|
| - if ext != '.pyc':
|
| - continue
|
| -
|
| - pyc_path = os.path.join(dirname, filename)
|
| - py_path = os.path.join(dirname, root + '.py')
|
| -
|
| - try:
|
| - if not os.path.exists(py_path):
|
| - os.remove(pyc_path)
|
| - except OSError:
|
| - # Wrap OS calls in try/except in case another process touched this file.
|
| - pass
|
| -
|
| - try:
|
| - os.removedirs(dirname)
|
| - except OSError:
|
| - # Wrap OS calls in try/except in case another process touched this dir.
|
| - pass
|
| -
|
| -
|
| -RemoveAllStalePycFiles(os.path.dirname(__file__))
|
|
|