Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/env python | |
| 2 # | |
| 3 # Copyright 2016 Google Inc. | |
| 4 # | |
| 5 # Use of this source code is governed by a BSD-style license that can be | |
| 6 # found in the LICENSE file. | |
| 7 | |
| 8 | |
| 9 """Download the current version of the asset.""" | |
| 10 | |
| 11 | |
| 12 import os | |
| 13 import sys | |
| 14 | |
| 15 FILE_DIR = os.path.dirname(os.path.abspath(__file__)) | |
| 16 INFRA_BOTS_DIR = os.path.realpath(os.path.join(FILE_DIR, os.pardir, os.pardir)) | |
| 17 | |
| 18 sys.path.insert(0, INFRA_BOTS_DIR) | |
| 19 from assets import assets | |
| 20 | |
| 21 ASSET_NAME = os.path.basename(FILE_DIR) | |
| 22 | |
| 23 | |
| 24 if __name__ == '__main__': | |
| 25 assets.main(['download', ASSET_NAME] + sys.argv[1:]) | |
|
rmistry
2016/06/15 13:47:18
sys.exit(...) here and in all scripts with "if __n
borenet
2016/06/15 14:31:27
I'm not sure what you mean. We'll exit with code
rmistry
2016/06/15 14:49:40
Right, the advantage of using sys.exit is when the
| |
| OLD | NEW |