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

Side by Side Diff: tools-webrtc/gn_check_autofix.py

Issue 2741733003: Reland of PyLint fixes for tools-webrtc and webrtc/tools (Closed)
Patch Set: Rebased Created 3 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
« no previous file with comments | « tools-webrtc/get_landmines.py ('k') | tools-webrtc/network_emulator/emulate.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 3 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license 5 # Use of this source code is governed by a BSD-style license
6 # that can be found in the LICENSE file in the root of the source 6 # that can be found in the LICENSE file in the root of the source
7 # tree. An additional intellectual property rights grant can be found 7 # tree. An additional intellectual property rights grant can be found
8 # in the file PATENTS. All contributing project authors may 8 # in the file PATENTS. All contributing project authors may
9 # be found in the AUTHORS file in the root of the source tree. 9 # be found in the AUTHORS file in the root of the source tree.
10 10
(...skipping 25 matching lines...) Expand all
36 36
37 class TemporaryDirectory(object): 37 class TemporaryDirectory(object):
38 def __init__(self): 38 def __init__(self):
39 self._closed = False 39 self._closed = False
40 self._name = None 40 self._name = None
41 self._name = tempfile.mkdtemp() 41 self._name = tempfile.mkdtemp()
42 42
43 def __enter__(self): 43 def __enter__(self):
44 return self._name 44 return self._name
45 45
46 def __exit__(self, exc, value, tb): 46 def __exit__(self, exc, value, _tb):
47 if self._name and not self._closed: 47 if self._name and not self._closed:
48 shutil.rmtree(self._name) 48 shutil.rmtree(self._name)
49 self._closed = True 49 self._closed = True
50 50
51 51
52 def Run(cmd): 52 def Run(cmd):
53 print 'Running:', ' '.join(cmd) 53 print 'Running:', ' '.join(cmd)
54 sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 54 sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
55 return sub.communicate() 55 return sub.communicate()
56 56
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 print '\n'.join(error) 149 print '\n'.join(error)
150 continue 150 continue
151 151
152 for path, missing_deps in errors_by_file.items(): 152 for path, missing_deps in errors_by_file.items():
153 FixErrors(path, missing_deps, deleted_sources) 153 FixErrors(path, missing_deps, deleted_sources)
154 154
155 return 0 155 return 0
156 156
157 if __name__ == '__main__': 157 if __name__ == '__main__':
158 sys.exit(main()) 158 sys.exit(main())
OLDNEW
« no previous file with comments | « tools-webrtc/get_landmines.py ('k') | tools-webrtc/network_emulator/emulate.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698