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

Side by Side Diff: build/android/pylib/screenshot.py

Issue 132463007: Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase vs tot and only disabling F0401 in specific spots Created 6 years, 10 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
« no previous file with comments | « build/android/pylib/ports.py ('k') | build/android/pylib/system_properties.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 os 5 import os
6 import tempfile 6 import tempfile
7 import time 7 import time
8 8
9 import android_commands 9 from pylib import cmd_helper
10 import cmd_helper
11 10
12 11
13 def _GetTimestamp(): 12 def _GetTimestamp():
14 return time.strftime('%Y-%m-%d-%H%M%S', time.localtime()) 13 return time.strftime('%Y-%m-%d-%H%M%S', time.localtime())
15 14
16 15
17 def _EnsureHostDirectory(host_file): 16 def _EnsureHostDirectory(host_file):
18 host_dir = os.path.dirname(os.path.abspath(host_file)) 17 host_dir = os.path.dirname(os.path.abspath(host_file))
19 if not os.path.exists(host_dir): 18 if not os.path.exists(host_dir):
20 os.makedirs(host_dir) 19 os.makedirs(host_dir)
21 20
22 21
23 def TakeScreenshot(adb, host_file): 22 def TakeScreenshot(adb, host_file):
24 """Saves a screenshot image to |host_file| on the host. 23 """Saves a screenshot image to |host_file| on the host.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 100
102 def Pull(self): 101 def Pull(self):
103 """Pull resulting video file from the device. 102 """Pull resulting video file from the device.
104 103
105 Returns: 104 Returns:
106 Output video file name on the host. 105 Output video file name on the host.
107 """ 106 """
108 self._adb.PullFileFromDevice(self._device_file, self._host_file) 107 self._adb.PullFileFromDevice(self._device_file, self._host_file)
109 self._adb.RunShellCommand('rm -f "%s"' % self._device_file) 108 self._adb.RunShellCommand('rm -f "%s"' % self._device_file)
110 return self._host_file 109 return self._host_file
OLDNEW
« no previous file with comments | « build/android/pylib/ports.py ('k') | build/android/pylib/system_properties.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698