Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: appengine/swarming/swarming_bot/__main__.py

Issue 2471063002: swarming: Package ts_mon python library (and dependencies) in bot code. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « appengine/swarming/server/bot_archive.py ('k') | appengine/swarming/swarming_bot/infra_libs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The LUCI Authors. All rights reserved. 1 # Copyright 2014 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Runs either task_runner.py, bot_main.py or bot_config.py. 5 """Runs either task_runner.py, bot_main.py or bot_config.py.
6 6
7 The imports are done late so if an ImportError occurs, it is localized to this 7 The imports are done late so if an ImportError occurs, it is localized to this
8 command only. 8 command only.
9 """ 9 """
10 10
(...skipping 14 matching lines...) Expand all
25 # This file can only be run as a zip. 25 # This file can only be run as a zip.
26 THIS_FILE = os.path.abspath(zip_package.get_main_script_path()) 26 THIS_FILE = os.path.abspath(zip_package.get_main_script_path())
27 27
28 28
29 # libusb1 expects to be directly in sys.path. 29 # libusb1 expects to be directly in sys.path.
30 sys.path.insert(0, os.path.join(THIS_FILE, 'python_libusb1')) 30 sys.path.insert(0, os.path.join(THIS_FILE, 'python_libusb1'))
31 31
32 # Copied from //client/utils/oauth.py. 32 # Copied from //client/utils/oauth.py.
33 sys.path.insert(0, os.path.join(THIS_FILE, 'third_party')) 33 sys.path.insert(0, os.path.join(THIS_FILE, 'third_party'))
34 sys.path.insert(0, os.path.join(THIS_FILE, 'third_party', 'pyasn1')) 34 sys.path.insert(0, os.path.join(THIS_FILE, 'third_party', 'pyasn1'))
35 sys.path.insert(0, os.path.join(THIS_FILE, 'third_party', 'pyasn1-modules'))
35 sys.path.insert(0, os.path.join(THIS_FILE, 'third_party', 'rsa')) 36 sys.path.insert(0, os.path.join(THIS_FILE, 'third_party', 'rsa'))
36 37
37 from bot_code import common 38 from bot_code import common
38 39
39 40
40 # TODO(maruel): Use depot_tools/subcommand.py. The goal here is to have all the 41 # TODO(maruel): Use depot_tools/subcommand.py. The goal here is to have all the
41 # sub commands packed into the single .zip file as a swiss army knife (think 42 # sub commands packed into the single .zip file as a swiss army knife (think
42 # busybox but worse). 43 # busybox but worse).
43 44
44 45
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 with zipfile.ZipFile(THIS_FILE, 'r') as f: 239 with zipfile.ZipFile(THIS_FILE, 'r') as f:
239 logging.error('Files in %s:\n%s', THIS_FILE, f.namelist()) 240 logging.error('Files in %s:\n%s', THIS_FILE, f.namelist())
240 return 1 241 return 1
241 242
242 print >> sys.stderr, 'Unknown command %s' % cmd 243 print >> sys.stderr, 'Unknown command %s' % cmd
243 return 1 244 return 1
244 245
245 246
246 if __name__ == '__main__': 247 if __name__ == '__main__':
247 sys.exit(main()) 248 sys.exit(main())
OLDNEW
« no previous file with comments | « appengine/swarming/server/bot_archive.py ('k') | appengine/swarming/swarming_bot/infra_libs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698