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

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

Issue 2584433002: Create top-level dir tools-webrtc and start moving things into it. (Closed)
Patch Set: Created 4 years 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/network_emulator/emulate.py ('k') | tools-webrtc/sancov/README » ('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 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """Script for constraining traffic on the local machine.""" 10 """Script for constraining traffic on the local machine."""
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 cmd_list = ipfw_command[:] + [str(x) for x in command] 180 cmd_list = ipfw_command[:] + [str(x) for x in command]
181 cmd_string = ' '.join(cmd_list) 181 cmd_string = ' '.join(cmd_list)
182 logging.debug('Running command: %s', cmd_string) 182 logging.debug('Running command: %s', cmd_string)
183 process = subprocess.Popen(cmd_list, stdout=subprocess.PIPE, 183 process = subprocess.Popen(cmd_list, stdout=subprocess.PIPE,
184 stderr=subprocess.PIPE) 184 stderr=subprocess.PIPE)
185 output, error = process.communicate() 185 output, error = process.communicate()
186 if process.returncode != 0: 186 if process.returncode != 0:
187 raise NetworkEmulatorError(fail_msg, cmd_string, process.returncode, output, 187 raise NetworkEmulatorError(fail_msg, cmd_string, process.returncode, output,
188 error) 188 error)
189 return output.strip() 189 return output.strip()
OLDNEW
« no previous file with comments | « tools-webrtc/network_emulator/emulate.py ('k') | tools-webrtc/sancov/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698