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

Unified Diff: build/android/pylib/remote/device/appurify_sanitized.py

Issue 2488453002: [android] Remove pylib/{remote,uirobot}. (Closed)
Patch Set: Remove remote_device_dummy_apk from rules.gni. Created 4 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: build/android/pylib/remote/device/appurify_sanitized.py
diff --git a/build/android/pylib/remote/device/appurify_sanitized.py b/build/android/pylib/remote/device/appurify_sanitized.py
deleted file mode 100644
index 48736d5617ff0059ed2cacf826334f6a26bd29e3..0000000000000000000000000000000000000000
--- a/build/android/pylib/remote/device/appurify_sanitized.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import contextlib
-import logging
-import os
-
-from pylib.constants import host_paths
-
-_REQUESTS_PATH = os.path.join(
- host_paths.DIR_SOURCE_ROOT, 'third_party', 'requests', 'src')
-_APPURIFY_PYTHON_PATH = os.path.join(
- host_paths.DIR_SOURCE_ROOT, 'third_party', 'appurify-python', 'src')
-
-with host_paths.SysPath(_REQUESTS_PATH), (
- host_paths.SysPath(_APPURIFY_PYTHON_PATH)):
-
- handlers_before = list(logging.getLogger().handlers)
-
- import appurify.api # pylint: disable=import-error
- import appurify.utils # pylint: disable=import-error
-
- handlers_after = list(logging.getLogger().handlers)
- new_handler = list(set(handlers_after) - set(handlers_before))
- while new_handler:
- logging.info("Removing logging handler.")
- logging.getLogger().removeHandler(new_handler.pop())
-
- api = appurify.api
- utils = appurify.utils
-
-# This is not thread safe. If multiple threads are ever supported with appurify
-# this may cause logging messages to go missing.
-@contextlib.contextmanager
-def SanitizeLogging(verbose_count, level):
- if verbose_count < 2:
- logging.disable(level)
- yield True
- logging.disable(logging.NOTSET)
- else:
- yield False
-
« no previous file with comments | « build/android/pylib/remote/device/appurify_constants.py ('k') | build/android/pylib/remote/device/dummy/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698