OLD | NEW |
1 # Copyright 2015 The Swarming Authors. All rights reserved. | 1 # Copyright 2015 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import os | 5 import os |
6 import sys | 6 import sys |
7 | 7 |
8 | 8 |
9 # swarming_bot/ | 9 # swarming_bot/ |
10 BOT_DIR = os.path.dirname(os.path.realpath(os.path.abspath(__file__))) | 10 BOT_DIR = os.path.dirname(os.path.realpath(os.path.abspath(__file__))) |
11 | 11 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 with open(tp, 'rb') as f: | 46 with open(tp, 'rb') as f: |
47 tp = os.path.join(BOT_DIR, f.read()) | 47 tp = os.path.join(BOT_DIR, f.read()) |
48 sys.path.insert(0, tp) | 48 sys.path.insert(0, tp) |
49 | 49 |
50 # libusb1 expects to be directly in sys.path. | 50 # libusb1 expects to be directly in sys.path. |
51 sys.path.insert(0, os.path.join(BOT_DIR, 'python_libusb1')) | 51 sys.path.insert(0, os.path.join(BOT_DIR, 'python_libusb1')) |
52 | 52 |
53 # For python-rsa. | 53 # For python-rsa. |
54 sys.path.insert(0, os.path.join(tp, 'rsa')) | 54 sys.path.insert(0, os.path.join(tp, 'rsa')) |
55 sys.path.insert(0, os.path.join(tp, 'pyasn1')) | 55 sys.path.insert(0, os.path.join(tp, 'pyasn1')) |
OLD | NEW |