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

Side by Side Diff: build/android/devil/android/md5sum.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 # 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 import collections
6 import logging
7 import os 5 import os
8 import posixpath 6 import posixpath
9 import re 7 import re
10 import tempfile
11 import types
12 8
13 from devil.android import device_errors 9 from devil.android import device_errors
14 from devil.android import device_temp_file
15 from devil.utils import cmd_helper 10 from devil.utils import cmd_helper
16 from pylib import constants 11 from pylib import constants
17 12
18 MD5SUM_DEVICE_LIB_PATH = '/data/local/tmp/md5sum/' 13 MD5SUM_DEVICE_LIB_PATH = '/data/local/tmp/md5sum/'
19 MD5SUM_DEVICE_BIN_PATH = MD5SUM_DEVICE_LIB_PATH + 'md5sum_bin' 14 MD5SUM_DEVICE_BIN_PATH = MD5SUM_DEVICE_LIB_PATH + 'md5sum_bin'
20 15
21 _STARTS_WITH_CHECKSUM_RE = re.compile(r'^\s*[0-9a-fA-F]{32}\s+') 16 _STARTS_WITH_CHECKSUM_RE = re.compile(r'^\s*[0-9a-fA-F]{32}\s+')
22 17
23 18
24 def CalculateHostMd5Sums(paths): 19 def CalculateHostMd5Sums(paths):
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 raise 101 raise
107 102
108 return _ParseMd5SumOutput(out) 103 return _ParseMd5SumOutput(out)
109 104
110 105
111 def _ParseMd5SumOutput(out): 106 def _ParseMd5SumOutput(out):
112 hash_and_path = (l.split(None, 1) for l in out 107 hash_and_path = (l.split(None, 1) for l in out
113 if l and _STARTS_WITH_CHECKSUM_RE.match(l)) 108 if l and _STARTS_WITH_CHECKSUM_RE.match(l))
114 return dict((p, h) for h, p in hash_and_path) 109 return dict((p, h) for h, p in hash_and_path)
115 110
OLDNEW
« no previous file with comments | « build/android/devil/android/logcat_monitor_test.py ('k') | build/android/devil/android/md5sum_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698