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

Side by Side Diff: build/android/pylib/device/device_utils.py

Issue 233203003: Fix get_device_configuration.py/device_utils.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use basestring instead of str or unicode Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/gyp/util/build_device.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """ 5 """
6 Provides a variety of device interactions based on adb. 6 Provides a variety of device interactions based on adb.
7 7
8 Eventually, this will be based on adb_wrapper. 8 Eventually, this will be based on adb_wrapper.
9 """ 9 """
10 10
11 import pylib.android_commands 11 import pylib.android_commands
12 from pylib.device import adb_wrapper 12 from pylib.device import adb_wrapper
13 13
14 14
15 def GetAVDs(): 15 def GetAVDs():
16 return pylib.android_commands.GetAVDs() 16 return pylib.android_commands.GetAVDs()
17 17
18 18
19 class DeviceUtils(object): 19 class DeviceUtils(object):
20 20
21 def __init__(self, device): 21 def __init__(self, device):
22 self.old_interface = None 22 self.old_interface = None
23 if isinstance(device, str): 23 if isinstance(device, basestring):
24 self.old_interface = pylib.android_commands.AndroidCommands(device) 24 self.old_interface = pylib.android_commands.AndroidCommands(device)
25 elif isinstance(device, adb_wrapper.AdbWrapper): 25 elif isinstance(device, adb_wrapper.AdbWrapper):
26 self.old_interface = pylib.android_commands.AndroidCommands(str(device)) 26 self.old_interface = pylib.android_commands.AndroidCommands(str(device))
27 elif isinstance(device, pylib.android_commands.AndroidCommands): 27 elif isinstance(device, pylib.android_commands.AndroidCommands):
28 self.old_interface = device 28 self.old_interface = device
29 elif not device: 29 elif not device:
30 self.old_interface = pylib.android_commands.AndroidCommands() 30 self.old_interface = pylib.android_commands.AndroidCommands()
31 31
OLDNEW
« no previous file with comments | « build/android/gyp/util/build_device.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698