1#!/usr/bin/env python 2# Copyright 2015 The Chromium OS Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6"""Force a DUT through the standard servo repair cycle. 7 8This command is meant primarily for use in the following use case: 9 * A DUT with servo attached has failed repair. 10 * The servo has been fixed, and we now want to confirm the 11 fix by using servo to repair the DUT. 12 13The command will force selected DUTs through the standard servo 14repair cycle, reinstalling the stable test image on the DUTs 15from USB. 16 17""" 18 19import sys 20 21import common 22from autotest_lib.site_utils.deployment import install 23 24 25def main(argv): 26 """Standard main routine. 27 28 @param argv Command line arguments including `sys.argv[0]`. 29 """ 30 install.install_duts(argv, full_deploy=False) 31 32 33if __name__ == '__main__': 34 try: 35 main(sys.argv) 36 except KeyboardInterrupt: 37 pass 38 except EnvironmentError as e: 39 sys.stderr.write('Unexpected OS error:\n %s\n' % e) 40 except Exception as e: 41 sys.stderr.write('Unexpected exception:\n %s\n' % e) 42