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

Unified Diff: lib/cros_build_lib.py

Issue 6541008: au_test_harness: fix a function call, add sudo in front of ifconfig (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: 80 chars Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bin/cros_au_test_harness.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/cros_build_lib.py
diff --git a/lib/cros_build_lib.py b/lib/cros_build_lib.py
index 11fa40cac9cf94813f27c70fda281940124f1f96..138bfa7db396112c56b4f1a8ad4980e459493bdb 100644
--- a/lib/cros_build_lib.py
+++ b/lib/cros_build_lib.py
@@ -256,8 +256,8 @@ def GetIPAddress(device='eth0'):
this method gives you a generic way to get the address so you are reachable
either via a VM or remote machine on the same network.
"""
- ifconfig_output = RunCommand(['ifconfig', device], redirect_stdout=True,
- print_cmd=False)
+ ifconfig_output = RunCommand(['sudo', 'ifconfig', device],
+ redirect_stdout=True, print_cmd=False)
match = re.search('.*inet addr:(\d+\.\d+\.\d+\.\d+).*', ifconfig_output)
if match:
return match.group(1)
« no previous file with comments | « bin/cros_au_test_harness.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698