OLD | NEW |
(Empty) | |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import logging |
| 6 import os |
| 7 import sys |
| 8 |
| 9 from pylib import constants |
| 10 |
| 11 sys.path.append(os.path.join( |
| 12 constants.DIR_SOURCE_ROOT, 'third_party', 'requests', 'src')) |
| 13 sys.path.append(os.path.join( |
| 14 constants.DIR_SOURCE_ROOT, 'third_party', 'appurify-python', 'src')) |
| 15 handlers_before = list(logging.getLogger().handlers) |
| 16 |
| 17 import appurify.api |
| 18 import appurify.utils |
| 19 |
| 20 handlers_after = list(logging.getLogger().handlers) |
| 21 new_handler = list(set(handlers_after) - set(handlers_before)) |
| 22 while new_handler: |
| 23 logging.info("Removing logging handler.") |
| 24 logging.getLogger().removeHandler(new_handler.pop()) |
| 25 |
| 26 api = appurify.api |
| 27 utils = appurify.utils |
OLD | NEW |