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

Unified Diff: build/android/devil/android/device_blacklist.py

Issue 1314823011: [Android] Don't use a device blacklist if one isn't provided. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « build/android/buildbot/bb_device_status_check.py ('k') | build/android/devil/android/device_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/android/device_blacklist.py
diff --git a/build/android/devil/android/device_blacklist.py b/build/android/devil/android/device_blacklist.py
index 0724654be7b9b5575eb551ce9eda7cb82ca5e095..615b3e6bea5fef2f4ca6a522cdc7c4656d0862cc 100644
--- a/build/android/devil/android/device_blacklist.py
+++ b/build/android/devil/android/device_blacklist.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import json
+import logging
import os
import threading
@@ -49,34 +50,16 @@ class Blacklist(object):
Args:
devices: list of bad devices to be added to the blacklist file.
"""
+ logging.info('Adding %s to blacklist %s', ','.join(devices), self._path)
with self._blacklist_lock:
- blacklist = ReadBlacklist()
+ blacklist = self.Read()
blacklist.extend(devices)
- WriteBlacklist(blacklist)
+ self.Write(blacklist)
def Reset(self):
"""Erases the blacklist file if it exists."""
+ logging.info('Resetting blacklist %s', self._path)
with self._blacklist_lock:
if os.path.exists(self._path):
os.remove(self._path)
-
-def ReadBlacklist():
- # TODO(jbudorick): Phase out once all clients have migrated.
- return Blacklist(BLACKLIST_JSON).Read()
-
-
-def WriteBlacklist(blacklist):
- # TODO(jbudorick): Phase out once all clients have migrated.
- Blacklist(BLACKLIST_JSON).Write(blacklist)
-
-
-def ExtendBlacklist(devices):
- # TODO(jbudorick): Phase out once all clients have migrated.
- Blacklist(BLACKLIST_JSON).Extend(devices)
-
-
-def ResetBlacklist():
- # TODO(jbudorick): Phase out once all clients have migrated.
- Blacklist(BLACKLIST_JSON).Reset()
-
« no previous file with comments | « build/android/buildbot/bb_device_status_check.py ('k') | build/android/devil/android/device_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698