OLD | NEW |
---|---|
1 # Copyright 2016 The LUCI Authors. All rights reserved. | 1 # Copyright 2016 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 import StringIO | 5 import calendar |
Vadim Sh.
2017/02/21 05:46:26
used on line 388, but wasn't imported
| |
6 import collections | 6 import collections |
7 import contextlib | 7 import contextlib |
8 import datetime | 8 import datetime |
9 import json | 9 import json |
10 import os | 10 import os |
11 import re | 11 import re |
12 import StringIO | |
12 import sys | 13 import sys |
14 import tempfile | |
13 import time | 15 import time |
14 import tempfile | |
15 import traceback | 16 import traceback |
16 | 17 |
17 from . import recipe_api | 18 from . import recipe_api |
18 from . import recipe_test_api | 19 from . import recipe_test_api |
19 from . import stream | 20 from . import stream |
20 from . import types | 21 from . import types |
21 from . import util | 22 from . import util |
22 | 23 |
23 import subprocess42 | 24 import subprocess42 |
24 | 25 |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
676 supplied command, and only uses the |env| kwarg for modifying the environment | 677 supplied command, and only uses the |env| kwarg for modifying the environment |
677 of the child process. | 678 of the child process. |
678 """ | 679 """ |
679 saved_path = os.environ['PATH'] | 680 saved_path = os.environ['PATH'] |
680 try: | 681 try: |
681 if path is not None: | 682 if path is not None: |
682 os.environ['PATH'] = path | 683 os.environ['PATH'] = path |
683 yield | 684 yield |
684 finally: | 685 finally: |
685 os.environ['PATH'] = saved_path | 686 os.environ['PATH'] = saved_path |
OLD | NEW |