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

Side by Side Diff: server/site_linux_router.py

Issue 3387009: Be lenient if deconfig fails to find a bridge (Closed) Base URL: ssh://gitrw.chromium.org/autotest.git
Patch Set: Created 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS 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, re, time 5 import logging, re, time
6 from autotest_lib.client.common_lib import error 6 from autotest_lib.client.common_lib import error
7 from autotest_lib.server import site_eap_tls 7 from autotest_lib.server import site_eap_tls
8 8
9 def isLinuxRouter(router): 9 def isLinuxRouter(router):
10 router_uname = router.run('uname').stdout 10 router_uname = router.run('uname').stdout
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 # self.router.run("rm -f %s" % self.hostapd['file']) 312 # self.router.run("rm -f %s" % self.hostapd['file'])
313 313
314 # Try a couple times to remove the bridge; hostapd may still be exiting 314 # Try a couple times to remove the bridge; hostapd may still be exiting
315 for attempt in range(3): 315 for attempt in range(3):
316 self.router.run("%s link set %s down" % 316 self.router.run("%s link set %s down" %
317 (self.cmd_ip, self.bridgeif), ignore_status=True) 317 (self.cmd_ip, self.bridgeif), ignore_status=True)
318 318
319 result = self.router.run("%s delbr %s" % 319 result = self.router.run("%s delbr %s" %
320 (self.cmd_brctl, self.bridgeif), 320 (self.cmd_brctl, self.bridgeif),
321 ignore_status=True) 321 ignore_status=True)
322 if not result.stderr: 322 if not result.stderr or 'No such device' in result.stderr:
323 break 323 break
324 time.sleep(1) 324 time.sleep(1)
325 else: 325 else:
326 raise error.TestFail("Unable to delete bridge %s: %s" % 326 raise error.TestFail("Unable to delete bridge %s: %s" %
327 (self.bridgeif, result.stderr)) 327 (self.bridgeif, result.stderr))
328 328
329 329
330 self.hostapd['configured'] = False 330 self.hostapd['configured'] = False
331 331
332 332
333 def get_ssid(self): 333 def get_ssid(self):
334 return self.hostapd['conf']['ssid'] 334 return self.hostapd['conf']['ssid']
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698