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

Side by Side Diff: build/android/pylib/screenshot.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 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 logging 5 import logging
6 import os 6 import os
7 import tempfile 7 import tempfile
8 import time 8 import time
9 9
10 from devil.android import device_errors
11 from devil.android import device_signal 10 from devil.android import device_signal
12 from devil.utils import cmd_helper 11 from devil.utils import cmd_helper
13 12
14 13
15 class VideoRecorder(object): 14 class VideoRecorder(object):
16 """Records a screen capture video from an Android Device (KitKat or newer). 15 """Records a screen capture video from an Android Device (KitKat or newer).
17 16
18 Args: 17 Args:
19 device: DeviceUtils instance. 18 device: DeviceUtils instance.
20 host_file: Path to the video file to store on the host. 19 host_file: Path to the video file to store on the host.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 # TODO(jbudorick): Merge filename generation with the logic for doing so in 82 # TODO(jbudorick): Merge filename generation with the logic for doing so in
84 # DeviceUtils. 83 # DeviceUtils.
85 host_file_name = ( 84 host_file_name = (
86 host_file 85 host_file
87 or 'screen-recording-%s.mp4' % time.strftime('%Y%m%dT%H%M%S', 86 or 'screen-recording-%s.mp4' % time.strftime('%Y%m%dT%H%M%S',
88 time.localtime())) 87 time.localtime()))
89 host_file_name = os.path.abspath(host_file_name) 88 host_file_name = os.path.abspath(host_file_name)
90 self._device.PullFile(self._device_file, host_file_name) 89 self._device.PullFile(self._device_file, host_file_name)
91 self._device.RunShellCommand('rm -f "%s"' % self._device_file) 90 self._device.RunShellCommand('rm -f "%s"' % self._device_file)
92 return host_file_name 91 return host_file_name
OLDNEW
« no previous file with comments | « build/android/pylib/results/report_results.py ('k') | build/android/pylib/uirobot/uirobot_test_instance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698