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

Side by Side Diff: build/android/devil/utils/reset_usb.py

Issue 1315743004: [Android] Add a custom pylintrc for build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix appurify_sanitized import-errors 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import fcntl 7 import fcntl
8 import logging 8 import logging
9 import re 9 import re
10 import sys 10 import sys
11 11
12 from devil.android import device_errors 12 from devil.android import device_errors
13 from devil.android.sdk import adb_wrapper
14 from devil.utils import cmd_helper
15 from devil.utils import lsusb 13 from devil.utils import lsusb
16 from devil.utils import run_tests_helper 14 from devil.utils import run_tests_helper
17 15
18 _INDENTATION_RE = re.compile(r'^( *)') 16 _INDENTATION_RE = re.compile(r'^( *)')
19 _LSUSB_BUS_DEVICE_RE = re.compile(r'^Bus (\d{3}) Device (\d{3}):') 17 _LSUSB_BUS_DEVICE_RE = re.compile(r'^Bus (\d{3}) Device (\d{3}):')
20 _LSUSB_ENTRY_RE = re.compile(r'^ *([^ ]+) +([^ ]+) *([^ ].*)?$') 18 _LSUSB_ENTRY_RE = re.compile(r'^ *([^ ]+) +([^ ]+) *([^ ].*)?$')
21 _LSUSB_GROUP_RE = re.compile(r'^ *([^ ]+.*):$') 19 _LSUSB_GROUP_RE = re.compile(r'^ *([^ ]+.*):$')
22 20
23 _USBDEVFS_RESET = ord('U') << 8 | 20 21 _USBDEVFS_RESET = ord('U') << 8 | 20
24 22
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 else: 91 else:
94 parser.error('Unable to determine target. ' 92 parser.error('Unable to determine target. '
95 'Specify --serial or BOTH --bus and --device.') 93 'Specify --serial or BOTH --bus and --device.')
96 94
97 return 0 95 return 0
98 96
99 97
100 if __name__ == '__main__': 98 if __name__ == '__main__':
101 sys.exit(main()) 99 sys.exit(main())
102 100
OLDNEW
« no previous file with comments | « build/android/devil/utils/reraiser_thread_unittest.py ('k') | build/android/devil/utils/timeout_retry.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698