OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """A class to keep track of devices across builds and report state.""" | 7 """A class to keep track of devices across builds and report state.""" |
8 import logging | 8 import logging |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 for serial, dev_errors in zip(devices, errors): | 176 for serial, dev_errors in zip(devices, errors): |
177 if dev_errors: | 177 if dev_errors: |
178 err_msg += ['%s errors:' % serial] | 178 err_msg += ['%s errors:' % serial] |
179 err_msg += [' %s' % error for error in dev_errors] | 179 err_msg += [' %s' % error for error in dev_errors] |
180 | 180 |
181 if err_msg: | 181 if err_msg: |
182 buildbot_report.PrintWarning() | 182 buildbot_report.PrintWarning() |
183 msg = '\n'.join(err_msg) | 183 msg = '\n'.join(err_msg) |
184 print msg | 184 print msg |
185 SendDeviceStatusAlert(msg) | 185 SendDeviceStatusAlert(msg) |
| 186 |
| 187 if not devices: |
186 return 1 | 188 return 1 |
187 | 189 |
188 | 190 |
189 if __name__ == '__main__': | 191 if __name__ == '__main__': |
190 sys.exit(main()) | 192 sys.exit(main()) |
OLD | NEW |