Edward Lemur | 32e3d1e | 2018-07-12 00:54:05 +0000 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | # Copyright (c) 2018 The Chromium 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 | import sys |
| 7 | import urllib2 |
| 8 | |
Edward Lemur | 5ba1e9c | 2018-07-23 18:19:02 +0000 | [diff] [blame^] | 9 | import metrics_utils |
Edward Lemur | 32e3d1e | 2018-07-12 00:54:05 +0000 | [diff] [blame] | 10 | |
| 11 | |
| 12 | def main(): |
| 13 | metrics = raw_input() |
| 14 | try: |
Edward Lemur | 5ba1e9c | 2018-07-23 18:19:02 +0000 | [diff] [blame^] | 15 | urllib2.urlopen(metrics_utils.APP_URL + '/upload', metrics) |
Edward Lemur | 32e3d1e | 2018-07-12 00:54:05 +0000 | [diff] [blame] | 16 | except urllib2.HTTPError: |
| 17 | pass |
| 18 | |
| 19 | return 0 |
| 20 | |
| 21 | |
| 22 | if __name__ == '__main__': |
| 23 | sys.exit(main()) |