Chromium Code Reviews| Index: build/android/device_status_check.py |
| diff --git a/build/android/device_status_check.py b/build/android/device_status_check.py |
| index 851fd94978bf80758a97aa83da1c05c6426200a8..50d0a80ee726620b22a38bc557c19b6c59837b03 100755 |
| --- a/build/android/device_status_check.py |
| +++ b/build/android/device_status_check.py |
| @@ -116,9 +116,12 @@ def CheckForMissingDevices(options, adb_online_devs): |
| 'To: %s' % to_address, |
| 'Subject: %s' % subject, |
| '', body]) |
| - server = smtplib.SMTP('localhost') |
| - server.sendmail(from_address, [to_address], msg_body) |
| - server.quit() |
| + try: |
| + server = smtplib.SMTP('localhost') |
| + server.sendmail(from_address, [to_address], msg_body) |
| + server.quit() |
| + except Exception, exception: |
|
bulach
2012/10/03 15:02:25
nit: s/,/as/
except Exception as e:
|
| + print 'Failed to send alert email. Error: %s' % exception |
| else: |
| new_devs = set(adb_online_devs) - set(last_devices) |
| if new_devs and os.path.exists(last_devices_path): |